3.8 KiB
Executable File
NixOS API Container
Configure your nixos modules, profiles & suites.
nixos
hosts, modules, suites, and profiles for NixOS
Type: submodule or path convertible to it
Default
{}
nixos.hostDefaults
Defaults for all hosts. the modules passed under hostDefaults will be exported to the 'nixosModules' flake output. They will also be added to all hosts.
Type: submodule
Default
{}
nixos.hostDefaults.channelName
Channel this host should follow
Type:
channel defined in channels
nixos.hostDefaults.exportedModules
modules to include in all hosts and export to nixosModules output
Type: list of valid modules or anything convertible to it or path convertible to it
Default
[]
nixos.hostDefaults.externalModules
The externalModules
option has been removed.
Any modules that should be exported should be defined with the exportedModules
option and all other modules should just go into the modules
option.
Type: list of valid modules or anything convertible to it
Default
[]
nixos.hostDefaults.modules
modules to include that won't be exported meant importing modules from external flakes
Type: list of valid modules or anything convertible to it or path convertible to it
Default
[]
nixos.hostDefaults.system
system for this host
Type:
null or system defined in supportedSystems
Default
null
nixos.hosts
configurations to include in the nixosConfigurations output
Type: attribute set of submodules
Default
{}
nixos.hosts.<name>.channelName
Channel this host should follow
Type:
null or channel defined in channels
Default
null
nixos.hosts.<name>.modules
modules to include
Type: list of valid modules or anything convertible to it or path convertible to it
Default
[]
nixos.hosts.<name>.system
system for this host
Type:
null or system defined in supportedSystems
Default
null
nixos.hosts.<name>.tests
tests to run
Type: list of valid NixOS test or path convertible to its or anything convertible to it
Default
[]
Example
{"_type":"literalExample","text":"[\n {\n name = \"testname1\";\n machine = { ... };\n testScript = ''\n # ...\n '';\n }\n ({ corutils, writers, ... }: {\n name = \"testname2\";\n machine = { ... };\n testScript = ''\n # ...\n '';\n })\n ./path/to/test.nix\n];\n"}
nixos.importables
Packages of paths to be passed to modules as specialArgs
.
Type: attribute set
Default
{}
nixos.importables.suites
collections of profiles
Type: null or attribute set of list of paths or anything convertible to its or path convertible to it
Default
null
nixos.profiles
WARNING: The 'suites' and profiles
options have been deprecated, you can now create
both with the importables option. rakeLeaves
can be used to create profiles and
by passing a module or rec
set to importables
, suites can access profiles.
Example:
importables = rec {
profiles = digga.lib.rakeLeaves ./profiles;
suites = with profiles; { };
}
See https://github.com/divnix/digga/pull/30 for more details
Type: list of paths or path convertible to it
Default
[]
nixos.suites
WARNING: The 'suites' and profiles
options have been deprecated, you can now create
both with the importables option. rakeLeaves
can be used to create profiles and
by passing a module or rec
set to importables
, suites can access profiles.
Example:
importables = rec {
profiles = digga.lib.rakeLeaves ./profiles;
suites = with profiles; { };
}
See https://github.com/divnix/digga/pull/30 for more details
Type: function that evaluates to a(n) attrs or path convertible to it