All Extensions
This section describes all official Denix extensions.
Args
| Name | args |
|---|---|
| Description | More convenient way to configure _module.args via myconfig |
| Maintainers | yunfachi (GitHub, Telegram) |
Settings
| Name | Default Value | Description |
|---|---|---|
path | "args" | Path in myconfig where options will be created |
Base
| Name | base |
|---|---|
| Description | Creates feature-rich and fine-tunable modules for hosts and rices with minimal effort |
| Maintainers | yunfachi (GitHub, Telegram) |
Settings
| Name | Default Value | Description |
|---|---|---|
enableAll | true | Default value for hosts.enable and rices.enable |
args
Name Default Value Description enablefalseDefault value for hosts.args.enableandrices.args.enablepath"args"Default value for hosts.args.pathandrices.args.path
assertions
Name Default Value Description enabletrueDefault value for hosts.assertions.enableandrices.assertions.enablemoduleSystem"home-manager"Default value for hosts.assertions.moduleSystemandrices.assertions.moduleSystem
hosts
Name Default Value Description enableenableAllWhether to create the hosts module extraSubmodules[]Additional submodules used to define custom options within the host type. Example value: [ ({ config, ... }: { options.coolName = "cool " + config.name; }) ]
hosts.args
Name Default Value Description enableargs.enableWhether to create hostandhostsarguments with theargsextensionpathargs.pathPath to options of the argsextension
hosts.system
Name Default Value Description enabletrueWhether to create a string option systemin the host submodule, which sets the values for thehomeManagerSystem,nixos.nixpkgs.hostPlatform, anddarwin.nixpkgs.hostPlatformoptions
hosts.assertions
Name Default Value Description enableassertions.enableWhether to add delib.hostNamesAssertionsto theassertionsoption of the specified module systemmoduleSystemassertions.moduleSystemModule system to which assertions will be added. Any value is allowed, even "myconfig"if you have a dedicated module for that. Values"home-manager"and"nix-darwin"will be automatically converted to"home"and"darwin"respectively
hosts.type
Name Default Value Description enabletrueWhether to create an enum option typein the host submodulegenerateIsTypetrueWhether to generate a boolean option for each value in hosts.type.types, formatted as"is{Type}". Also creates"isPC", with a value ofisDesktop || isLaptoptypes["desktop" "laptop" "server"]All allowed values for the typeoption in the host submodule. Note: to append to the list rather than overwrite it, use:types = prev.types ++ ["newType"];
hosts.features
Name Default Value Description enabletrueWhether to create the featuresoption with an enum-list type in the host submodulegenerateIsFeaturedtrueWhether to generate a boolean option for each value in hosts.features.features, formatted as"{feature}Featured"features[]All allowed values for the featuresoption in the host submoduledefault[]Default value for the featuresoption in the host submoduledefaultByHostType{}Attrset where keys are one of the hosts.type.typesvalues and values are lists similar tohosts.features.default. Merged withhosts.features.defaultand the list whose key matches the value of thetypeoption in the host submodule
hosts.displays
Name Default Value Description enabletrueWhether to create the displaysoption in the host submodule. Its type is a list of submodules with the following options:enable(bool; defaulttrue),name(str; no default),primary(bool; defaulttrue, but only if thedisplaysoptions in the host submodule contains one item),touchscreen(bool; defaultfalse),refreshRate(int; default60),width(int; default1920),height(int; default1080),x(int; default0),y(int; default0)
rices
Name Default Value Description enableenableAllWhether to create the rices module extraSubmodules[]Additional submodules used to define custom options within the rice type. Example value: [ ({ config, ... }: { options.coolName = "cool " + config.name; }) ]
rices.args
Name Default Value Description enableargs.enableWhether to create riceandricesarguments using theargsextensionpathargs.pathPath to options of the argsextension
rices.assertions
Name Default Value Description enableassertions.enableWhether to add delib.riceNamesAssertionsto theassertionsoption of the specified module systemmoduleSystemassertions.moduleSystemModule system to which assertions will be added. Any value is allowed, even "myconfig"if you have a dedicated module for that."home-manager"and"nix-darwin"will be automatically converted to"home"and"darwin"respectively
User
WIP
Overlays
| Name | overlays |
|---|---|
| Description | Simplified overlay configuration module |
| Maintainers | Zonni (GitHub) |
Settings
| Name | Default Value | Description |
|---|---|---|
defaultTargets | ["nixos" "home"] | Default targets to apply overlays |
moduleNamePrefix | "overlays" | Prefix added to module names when withPrefix is true |
Library
overlayModule
Creates a module that applies overlays for specified targets. If withPrefix is true, it creates the option ${moduleNamePrefix}.${name}.enable with the value delib.overlayModule :: enabled; otherwise, it does the same but in ${name}.enable.
Arguments:
| Name | Type | Default Value | Description |
|---|---|---|---|
name | string | required | Name of the overlay module |
overlay | overlay function | null | Single overlay function to apply |
overlays | list of overlay functions | [] | List of overlay functions to apply |
targets | list of strings | defaultTargets | Target systems to apply overlays to. Valid values: "nixos", "home", "darwin" |
withPrefix | boolean | true | Whether to add moduleNamePrefix to the module name |
enabled | boolean | true | Whether overlay should be enabled by default |