Module options¶
Base options¶
- option
boot.commandLineKernel command line
type list of non-empty string
default
[ ]
- option
boot.commandLineDtbNodeKernel command line’s devicetree node
type one of “bootargs”, “bootargs-override”
default
"bootargs"option
boot.imageFormattype one of “fit”, “uimage”
default
"uimage"option
boot.imageTypetype one of “primary”, “secondary”
default
"primary"
- option
boot.tftp.ipaddrOur IP address to use when creating scripts to boot or flash from U-Boot. Not relevant in normal operation
type string
- option
boot.tftp.loadAddressRAM address at which to load data when transferring via TFTP. This is not the address of the flash storage, nor the kernel load address: it should be set to some part of RAM that’s not used for anything else and suitable for temporary storage.
type unsigned integer, meaning >=0
- option
boot.tftp.serveripIP address of the TFTP server. Not relevant in normal operation
type string
- option
defaultProfile.packagesList of packages which are available in a login shell. (This is analogous to systemPackages in NixOS, but we don’t symlink into /run/current-system, we just add the paths in /etc/profile
type list of package
- option
filesystemSkeleton filesystem, represented as nested attrset. Consult the source code if you need to add to this
type anything
option
rootOptionstype null or string
default
nulloption
rootfsTypetype one of “btrfs”, “ext4”, “jffs2”, “squashfs”, “ubifs”
default
"squashfs"option
servicestype attribute set of s6-rc service
option
system.callServicetype function that evaluates to a(n) function that evaluates to a(n) anything
Busybox¶
Busybox provides stripped-down versions of many usual Linux/Unix tools, and may be configured to include only the commands (termed “applets”) required by the user or by other included modules.
- option
programs.busybox.appletsApplets required
type list of string
example
[ "sh" "getty" "login" ]default
[ ]
- option
programs.busybox.optionsOther busybox config flags that do not map directly to applet names (often prefixed FEATURE_)
type attribute set of non-empty string
example
{ FEATURE_DD_IBS_OBS = "y"; }default
{ }
Hardware-dependent options¶
These are attributes of the hardware not of the application
you want to run on it, and would usually be set in the “device” file:
devices/manuf-model/default.nix
- option
hardware.alignmentAlignment passed to mkimage for FIT
type null or (unsigned integer, meaning >=0)
default
null
- option
hardware.defaultOutput“Default” output: what gets built for this device when outputs.default is requested. Typically this is “mtdimage” or “vmroot”
type non-empty string
- option
hardware.dts.includePathsList of directories to search for DTS includes (.dtsi files)
type list of path
default
[ ]
- option
hardware.dts.includes“dtsi” fragments to include in the generated device tree
type list of path
default
[ ]
- option
hardware.dts.srcIf the device requires an external device tree to be loaded alongside the kernel, this is the path to the device tree source (we usually get these from OpenWrt). This value may be null if the platform creates the device tree - currently this is the case only for QEMU.
type null or path
option
hardware.entryPointtype unsigned integer, meaning >=0
- option
hardware.flash.addressStart address of whichever partition (often called “firmware”) we’re going to overwrite with our kernel uimage and root fs. Usually not the entire flash, as we don’t want to clobber the bootloader, calibration data etc
type unsigned integer, meaning >=0
- option
hardware.flash.eraseBlockSizeFlash erase block size in bytes
type unsigned integer, meaning >=0
- option
hardware.flash.sizeSize in bytes of the firmware partition
type unsigned integer, meaning >=0
option
hardware.loadAddresstype unsigned integer, meaning >=0
default
nulloption
hardware.networkInterfacestype attribute set of anything
- option
hardware.radiosKernel modules (from mac80211 package) required for the wireless devices on this board
type list of string
example
[ "ath9k" "ath10k" ]default
[ ]option
hardware.ram.startAddresstype signed integer
- option
hardware.rootDeviceFull path to preferred root device
type string
example
"/dev/mtdblock3"option
hardware.ubi.logicalEraseBlockSizetype string
option
hardware.ubi.maxLEBcounttype string
option
hardware.ubi.minIOSizetype string
option
hardware.ubi.physicalEraseBlockSizetype string
hostname¶
- option
hostnameSystem hostname of the device, as returned by gethostname(2). May or may not correspond to any name it’s reachable at on any network.
type non-empty string
default
"liminix"
logging¶
- option
logging.persistent.enableWhether to enable store logs across reboots.
type boolean
example
truedefault
false
boot-extlinux¶
- option
boot.loader.extlinux.enableWhether to enable extlinux.
type boolean
example
truedefault
false
boot-fit¶
- option
boot.loader.fit.enableWhether to enable FIT in /boot.
type boolean
example
truedefault
false
initramfs¶
- option
boot.initramfs.enableWhether to enable initramfs.
type boolean
example
truedefault
false
tftpboot¶
option
boot.tftp.appendDTBtype boolean
default
falseoption
boot.tftp.compressRoottype boolean
default
falseoption
boot.tftp.freeSpaceBytestype signed integer
default
0option
boot.tftp.kernelFormattype one of “zimage”, “uimage”
default
"uimage"
ramdisk¶
- option
boot.ramdisk.enableWhether to enable reserving part of memory as an MTD-based RAM disk. Needed for TFTP booting .
type boolean
example
truedefault
false
s6¶
- option
logging.directorydefault log directory
type path
default
"/run/log"
- option
logging.script“log script” used by fallback s6-log process
type string
default
"pliminix t"
- option
logging.shipping.enableWhether to enable unix socket for log shipping.
type boolean
example
truedefault
false
- option
logging.shipping.servicelog shipper service
type s6-rc service
- option
logging.shipping.socketsocket pathname
type path
default
"/run/.log-shipping.sock"
Users¶
User- and group-related configuration.
Changes made here are reflected in files such as :file:/etc/shadow, :file:/etc/passwd, :file:/etc/group etc. If you are familiar with user configuration in NixOS, please note that Liminix does not have the concept of “mutable users” - files in /etc/ are symlinks to the immutable store, so you can’t e.g change a password with passwd
option
groupstype attribute set of (submodule)
option
groups.<name>.gidtype signed integer
option
groups.<name>.usernamestype list of string
default
[ ]option
userstype attribute set of (submodule)
option
users.<name>.dirtype string
default
"/run"option
users.<name>.gecostype string
example
"Jo Q User"default
""option
users.<name>.gidtype signed integer
option
users.<name>.openssh.authorizedKeys.keystype list of string
default
[ ]
- option
users.<name>.passwdencrypted password, as generated by mkpasswd -m sha512crypt
type string
example
"$6$RIYL.EgWOrtoJ0/7$Z53a8sc0o6AU/kuFOGiLJKhwVavTG/deoM7JTs6luNczYSUsh4UYmhvT8sVzm.l8F/LZXhhhkC7IHQs5UGAIM/"default
"!!"option
users.<name>.shelltype string
default
"/bin/sh"option
users.<name>.uidtype signed integer
Bridge module¶
Allows creation of Layer 2 software “bridge” network devices. A common use case is to merge together a hardware Ethernet device with one or more WLANs so that several local devices appear to be on the same network.
path modules/bridge/default.nix
service
system.service.bridge.membersService parameters
- option
membersinterfaces to add to the bridge
type list of s6-rc service
- option
primaryprimary bridge interface
type s6-rc service
service
system.service.bridge.primaryService parameters
- option
ifnamebridge interface name to create
type string
DHCP6 client module¶
This is for use if you have an IPv6-capable upstream that provides address information and/or prefix delegation using DHCP6. It provides a service to request address information in the form of a DHCP lease, and two dependent services that listen for updates to the DHCP address information and can be used to update addresses of network interfaces that you want to assign those prefixes to
path modules/dhcp6c/default.nix
service
system.service.dhcp6c.addressService parameters
option
clienttype anything
- option
interfaceinterface to assign the address to
type s6-rc service
service
system.service.dhcp6c.clientService parameters
- option
interfaceinterface (usually WAN) to query for DHCP6
type s6-rc service
service
system.service.dhcp6c.prefixService parameters
option
clienttype anything
- option
interfaceinterface to assign <prefix>::1 to
type s6-rc service
Dnsmasq¶
This module includes a service to provide DNS, DHCP, and IPv6 router advertisement for the local network.
path modules/dnsmasq/default.nix
service
system.service.dnsmasqService parameters
- option
domainDomain name for DHCP service: causes the DHCP server to return the domain to any hosts which request it, and sets the domain which it is legal for DHCP-configured hosts to claim
type string
- option
groupSpecifies the unix group which dnsmasq will run as
type string
default
dnsmasqoption
hoststype attribute set of (submodule)
option
interfacetype s6-rc service
option
rangestype list of string
option
resolvconftype null or s6-rc service
option
upstreamstype list of string
- option
userSpecifies the unix user which dnsmasq will run as
type string
default
dnsmasq
Firewall¶
Provides a service to create an nftables ruleset based on configuration supplied to it.
path modules/firewall/default.nix
service
system.service.firewallService parameters
- option
extraRulesfirewall ruleset
type attribute set of (attribute set)
- option
rulesfirewall ruleset
type attribute set of (attribute set)
option
zonestype attribute set of list of s6-rc service
Hostapd¶
Hostapd (host access point daemon) enables a wireless network interface to act as an access point and authentication server, providing IEEE 802.11 access point management, and IEEE 802.1X/WPA/WPA2/EAP Authenticators. In less technical terms, this service is what you need for your Liminix device to provide a wireless network that clients can connect to.
If you have more than one wireless network interface (e.g. wlan0, wlan1) you can run an instance of hostapd on each of them.
path modules/hostapd/default.nix
service
system.service.hostapdService parameters
option
interfacetype s6-rc service
option
paramstype attribute set
ifwait¶
path modules/ifwait/default.nix
service
system.service.ifwaitService parameters
option
interfacetype s6-rc service
option
servicetype s6-rc service
option
statetype string
Mount
Mount filesystems
path modules/mount/default.nix
service
system.service.mountService parameters
option
fstypetype string
default
autooption
mountpointtype string
option
optionstype list of string
option
partlabeltype string
Network¶
Basic network services for creating hardware ethernet devices and adding addresses
path modules/network/default.nix
- service
system.service.network.addressnetwork interface address
Service parameters
option
addresstype string
option
familytype one of “inet”, “inet6”
option
interfacetype s6-rc service
option
prefixLengthtype integer between 0 and 128 (both inclusive)
- service
system.service.network.dhcp.clientDHCP v4 client
Service parameters
option
interfacetype s6-rc service
service
system.service.network.forwardService parameters
option
enableIPv4type boolean
option
enableIPv6type boolean
- service
system.service.network.linkhardware network interface
Service parameters
- option
devpathPath to the sysfs node of the device. If you provide this and the ifname option, the device will be renamed to the name given by ifname.
type null or string
- option
ifnameDevice name as used by the kernel (as seen in “ip link” or “ifconfig” output). If devpath is also specified, the device will be renamed to the name provided.
type string
option
mtutype null or signed integer
service
system.service.network.routeService parameters
- option
interfaceInterface to route through. May be omitted if it can be inferred from “via”
type null or s6-rc service
- option
metricroute metric
type signed integer
- option
targethost or network to add route to
type string
- option
viaaddress of next hop
type string
NTP¶
A network time protocol implementation so that your Liminix device may synchronize its clock with an accurate time source, and optionally also provide time service to its peers. The implementation used in Liminix is Chrony
path modules/ntp/default.nix
service
system.service.ntpService parameters
- option
allowsubnets from which NTP clients are allowed to access the server
type list of string
option
bindaddresstype null or string
option
binddevicetype null or string
option
dumpdirtype path
default
/run/chronyoption
extraConfigtype strings concatenated with “\n”
default
option
makesteptype null or (submodule)
option
peerstype attribute set of list of string
option
poolstype attribute set of list of string
option
serverstype attribute set of list of string
option
usertype string
default
ntp
PPP¶
ppoe (PPP over Ethernet) provides a service to address the case
where your Liminix device is connected to an upstream network using
PPPoE. This is typical for UK broadband connections where the
physical connection is made by OpenReach (“Fibre To The X”) and
common in some other localities as well: check with your ISP if this is
you.
l2tp (Layer 2 Tunelling Protocol) provides a service that
tunnels PPP over the Internet. This may be used by some ISPs in
conjunction with a DHCP uplink, or other more creative forms of
network connection
path modules/ppp/default.nix
service
system.service.l2tpService parameters
- option
debuglog the contents of all control packets sent or received
type boolean
option
lcpEchotype unspecified
- option
lnshostname or address of the L2TP network server
type string
- option
passwordpassword
type null or string or function that evaluates to a(n) anything
- option
ppp-optionsoptions supplied on ppp command line
type list of string
- option
usernameusername
type null or string or function that evaluates to a(n) anything
service
system.service.pppoeService parameters
- option
debuglog the contents of all control packets sent or received
type boolean
- option
interfaceethernet interface to run PPPoE over
type s6-rc service
option
lcpEchotype unspecified
- option
passwordpassword
type null or string or function that evaluates to a(n) anything
- option
ppp-optionsoptions supplied on ppp command line
type list of string
- option
usernameusername
type null or string or function that evaluates to a(n) anything
Secrets
path modules/secrets/default.nix
- service
system.service.secrets.outboardfetch secrets from external vault with https
Service parameters
- option
intervalhow often to check the source, in minutes
type signed integer
- option
nameservice name
type string
- option
passwordpassword for HTTP basic auth
type null or string
- option
urlsource url
type string matching the pattern https?://.*
- option
usernameusername for HTTP basic auth
type null or string
- service
system.service.secrets.subscriberwrapper around a service that needs notifying (e.g. restarting) when secrets change
Service parameters
- option
actionhow do we notify the service to regenerate its config
type one of “restart”, “restart-all”, “hup”, “int”, “quit”, “kill”, “term”, “winch”, “usr1”, “usr2”
default
restart-all
- option
servicesubscribing service that will receive notification
type s6-rc service
- option
watchsecrets paths to subscribe to
type list of function that evaluates to a(n) anything
- service
system.service.secrets.tangfetch secrets from encrypted local pathname, using tang
Service parameters
- option
intervalhow often to check the source, in minutes
type signed integer
- option
nameservice name
type string
- option
pathencrypted source pathname
type path
Secure Shell¶
Provide SSH service using Dropbear
path modules/ssh/default.nix
service
system.service.sshService parameters
- option
addressListen on specified address
type null or string
- option
allowLocalPortForwardEnable local port forwarding
type boolean
- option
allowPasswordLoginAllow login using password (disable for public key auth only)
type boolean
- option
allowPasswordLoginForRootAllow root to login using password (disable for public key auth only)
type boolean
- option
allowRemoteConnectionToForwardedPortsAllow remote hosts to connect to local forwarded ports (by default they are bound to loopback)
type boolean
- option
allowRemotePortForwardEnable remote port forwarding
type boolean
- option
allowRootAllow root to login
type boolean
- option
authorizedKeysAuthorized SSH public keys for each username. If this optin is provided it overrides any keys found in /home/{username}/.ssh
type null or (attribute set of list of non-empty string) or function that evaluates to a(n) anything
option
extraConfigtype strings concatenated with “ “
default
- option
portListen on specified TCP port
type 16 bit unsigned integer; between 0 and 65535 (both inclusive)
uevent-rule¶
path modules/uevent-rule/default.nix
- service
system.service.uevent-rulea service which starts other services based on device state (sysfs)
Service parameters
- option
serviceNamename of the service to run when the rule matches
type string
- option
symlinkcreate symlink targeted on devpath
type null or string
option
termstype attribute set
VLAN¶
Virtual LANs give you the ability to sub-divide a LAN. Linux can accept VLAN tagged traffic and presents each VLAN ID as a different network interface (eg: eth0.100 for VLAN ID 100)
Some Liminix devices with multiple ethernet ports are implemented using a network switch connecting the physical ports to the CPU, and require using VLAN in order to send different traffic to different ports (e.g. LAN vs WAN)
path modules/vlan/default.nix
service
system.service.vlanService parameters
- option
ifnameinterface name to create
type string
- option
primaryexisting physical interface
type s6-rc service
- option
vidVLAN identifier (VID) in range 1-4094
type string
Watchdog
Enable hardware watchdog (for devices that support one) and feed it by checking the health of specified critical services. If the watchdog feeder stops, the device will reboot.
path modules/watchdog/default.nix
service
system.service.watchdogService parameters
- option
headStartdelay in seconds before watchdog starts checking service health
type signed integer
- option
watchedservices to watch
type list of s6-rc service