The following list only includes the options defined by Mobile NixOS.

Refer to the NixOS options listing for more options.

Options list

mobile.adbd.enable
Type:
boolean
Default:
false
Description:

Enables adbd on the device.

mobile.boot.stage-1.bootlog.enable
Type:
boolean
Default:
true
Description:

Enables bootlogd logging multiplexer.

mobile.boot.stage-1.bootlog.kmsg
Type:
boolean
Default:
false
Description:

Enables logging to /dev/kmsg.

Note that this may render switching to stage-2 inoperable.

mobile.boot.stage-1.contents
Type:
list of attribute sets
Default:
[]
Description:

Additional files for the initrd.

See makeInitrd for use of contents.

mobile.boot.stage-1.crashToBootloader
Type:
boolean
Default:
false
Description:

When the stage-1 bootloader crashes, prefer rebooting directly to bootloader rather than panic by killing init.

This may be preferrable for devices with direct serial access.

Note that console ramoops requires the kernel to panic, this should be set to false if you rely on console ramoops to debug issues.

mobile.boot.stage-1.extraUtils
Type:
list of attribute set or packages
Description:

Additional packages to be included inside stage-1.

Do note that special manipulation happens and may not be compatible with everything.

The format for extra commands is: { package = package; extraCommand = extraCommand }

Where extraCommand is executed at build time, generally to fix the package for stage-1 use.

mobile.boot.stage-1.fail.delay
Type:
signed integer
Default:
10
Description:

Duration (in seconds) before a reboot on failure.

mobile.boot.stage-1.fail.reboot
Type:
boolean
Default:
true
Description:

Reboots the device after a delay on failure.

mobile.boot.stage-1.fbterm.enable
Type:
boolean
Default:
false
Description:

Enables fbterm.

mobile.boot.stage-1.fbterm.fb
Type:
string
Default:
"/dev/fb1"
Description:

framebuffer to run fbterm on.

mobile.boot.stage-1.firmware
Type:
list of packages
Default:
[]
Description:

List of packages containing firmware files to be included in the stage-1 for the device.

mobile.boot.stage-1.initFramebuffer
Type:
strings concatenated with "\n"
Default:
""
Description:

Commands ran particularly early for setting the framebuffer and framebuffer devices correctly.

It is expected that after these commands the framebuffer has been made available.

mobile.boot.stage-1.kernel.additionalModules
Type:
list of strings
Default:
[]
Description:

Module names to add to the closure. They will not be modprobed.

mobile.boot.stage-1.kernel.firmwares
Type:
list of strings
Default:
[]
Description:

Firmwares to add to the cloure.

mobile.boot.stage-1.kernel.modular
Type:
boolean
Default:
false
Description:

Whether the kernel is built with modules or not. This will enable modules closure generation and listing modules to bundle and load.

mobile.boot.stage-1.kernel.modules
Type:
list of strings
Default:
[]
Description:

Module names to add to the closure. They will be modprobed.

mobile.boot.stage-1.kernel.package
Type:
package
Description:

Kernel to be used by the system-type to boot into the Mobile NixOS stage-1.

This is not using a kernelPackages attrset, but a kernel derivation directly.

mobile.boot.stage-1.networking.IP
Type:
string
Default:
"172.16.42.1"
Description:

IP address for the USB networking gadget.

mobile.boot.stage-1.networking.enable
Type:
boolean
Default:
false
Description:

Enables networking.

mobile.boot.stage-1.networking.hostIP
Type:
string
Default:
"172.16.42.2"
Description:

IP address for the USB networking gadget.

mobile.boot.stage-1.shell.console
Type:
string
Default:
"console"
Description:

Selects the /dev/_ device to use.

Use ttyS0 for serial, tty1 for first VT or keep the default to console for the last defined console= kernel parameter.

mobile.boot.stage-1.shell.enable
Type:
boolean
Default:
false
Description:

Enables a shell before switching root.

This shell (as currently configured) will not allow switching root.

mobile.boot.stage-1.shell.shellOnFail
Type:
boolean
Default:
false
Description:

Enables a shell on failures.

mobile.boot.stage-1.ssh.enable
Type:
boolean
Default:
false
Description:

Enables ssh during stage-1.

CURRENT CONFIGURATION ALSO OPENS ACCESS TO ALL WITHOUT A PASSWORD NOR SSH KEY.

mobile.boot.stage-1.usb.enable
Type:
boolean
Default:
true
Description:

Enables USB features. For now, only Android-based devices are supported.

mobile.boot.stage-1.usb.features
Type:
list of strings
Default:
[]
Description:

android_usb features to enable.

mobile.device.firmware
Type:
package
Description:

Informal option that the end-user can use to get their device’s firmware package

The device configuration may provide this option so the user can simply use hardware.firmware = [ config.mobile.device.firmware ];.

Note that not all devices provide a firmware bundle, in this case the user should not add the previous example to their configuration.

This is not added automatically to the system firmwares as most device firmware bundles will be unredistributable.

mobile.device.identity.manufacturer
Type:
string
Description:

The device’s manufacturer name.

mobile.device.identity.name
Type:
string
Description:

The device’s name as advertised by the manufacturer.

mobile.device.name
Type:
string
Description:

The device’s codename. Must match the device folder.

mobile.generatedFilesystems
Type:
attribute set of submodules
Description:

Filesystem definitions that will be created at build.

mobile.generatedFilesystems..extraPadding
Type:
signed integer
Description:

Extra padding to add to the filesystem image.

mobile.generatedFilesystems..id
Type:
string
Description:

The UUID used by the generated rootfs, when generating a rootfs.

mobile.generatedFilesystems..label
Type:
string
Description:

The label used by the generated rootfs, when generating a rootfs, and the filesystem label a Mobile NixOS system will look for by default.

mobile.generatedFilesystems..populateCommands
Type:
strings concatenated with "\n"
Description:

Commands used to fill the filesystem.

$PWD is the root of the filesystem.

mobile.generatedFilesystems..type
Type:
one of "ext4"
Description:

Type of the generated filesystem.

mobile.hardware.ram
Type:
signed integer
Description:

Total RAM available (in MB, 1GB = 1024MB).

This may be used to turn on or off features depending on the device’s capabilities.

mobile.hardware.screen.height
Type:
signed integer
Description:

This option has no description.

mobile.hardware.screen.width
Type:
signed integer
Description:

This option has no description.

mobile.hardware.soc
Type:
string
Description:

Give the SOC name for the device.

mobile.hardware.socs.allwinner-a64.enable
Type:
boolean
Default:
false
Description:

enable when SOC is Allwinner A64

mobile.hardware.socs.allwinner-r18.enable
Type:
boolean
Default:
false
Description:

enable when SOC is Allwinner-R18

mobile.hardware.socs.mediatek-mt6755.enable
Type:
boolean
Default:
false
Description:

enable when SOC is Mediatek MT6755 (Helio P10)

mobile.hardware.socs.mediatek-mt6785.enable
Type:
boolean
Default:
false
Description:

enable when SOC is Mediatek MT6785 (Helio G90)

mobile.hardware.socs.qualcomm-apq8064-1aa.enable
Type:
boolean
Default:
false
Description:

enable when SOC is APQ8064–1AA

mobile.hardware.socs.qualcomm-msm8939.enable
Type:
boolean
Default:
false
Description:

enable when SOC is msm8939

mobile.hardware.socs.qualcomm-msm8953.enable
Type:
boolean
Default:
false
Description:

enable when SOC is msm8953

mobile.hardware.socs.qualcomm-msm8996.enable
Type:
boolean
Default:
false
Description:

enable when SOC is msm8996

mobile.hardware.socs.qualcomm-msm8998.enable
Type:
boolean
Default:
false
Description:

enable when SOC is msm8998

mobile.hardware.socs.qualcomm-sdm660.enable
Type:
boolean
Default:
false
Description:

enable when SOC is SDM660

mobile.hardware.socs.rockchip-op1.enable
Type:
boolean
Default:
false
Description:

enable when SOC is RK3399-OP1

mobile.quirks.fb-refresher.enable
Type:
boolean
Default:
false
Description:

Enables use of msm-fb-refresher. Use sparingly, it is better to patch software to flip buffers instead.

Note that while it was written for Qualcomm devices, this workaround may be useful for other vendors too.

mobile.quirks.qualcomm.dwc3-otg_switch.enable
Type:
boolean
Default:
false
Description:

Enable this on a device which requires otg_switch to be configured for OTG to work.

mobile.quirks.qualcomm.fb-notify.enable
Type:
boolean
Default:
false
Description:

Enable this on a device which requires the framebuffer to be notified for some components to work right.

The most likely thing this fixes is touch input.

mobile.quirks.qualcomm.wcnss-wlan.enable
Type:
boolean
Default:
false
Description:

Enable this on a device which uses wcnss wlan.

mobile.quirks.u-boot.additionalCommands
Type:
string
Default:
""
Description:

Additional U-Boot commands to run.

mobile.quirks.u-boot.initialGapSize
Type:
signed integer
Description:

Size (in bytes) to keep reserved in front of the first partition.

mobile.quirks.u-boot.package
Type:
package
Description:

Which package handles u-boot for this system.

mobile.system.system
Type:
one of "aarch64-linux", "armv7l-linux", "x86_64-linux"
Description:

Defines the kind of target architecture system the device is.

This will automagically setup cross-compilation where possible.

mobile.system.type
Type:
one of "u-boot", "android", "qemu-startscript", "depthcharge", "none"
Description:

Defines the kind of system the device is.

The different kind of system types will define the outputs produced for the system.

mobile.usb.gadgetfs.functions
Type:
attribute set
Description:

Mapping of logical gadgetfs functions to their implementation names.

mobile.usb.idProduct
Type:
string
Description:

USB product ID for the USB gadget.

mobile.usb.idVendor
Type:
string
Description:

USB vendor ID for the USB gadget.

mobile.usb.mode
Type:
null or one of "android_usb", "gadgetfs"
Default:
null
Description:

The USB gadget implementation the device uses.