2021-07-21 04:41:00 +03:00
|
|
|
# NixOS API Container
|
2021-09-05 13:17:57 +03:00
|
|
|
Configure your nixos modules, profiles & suites.
|
2021-07-21 04:41:00 +03:00
|
|
|
|
|
|
|
|
2021-09-05 13:17:57 +03:00
|
|
|
## nixos
|
2021-08-04 19:18:23 +03:00
|
|
|
hosts, modules, suites, and profiles for NixOS
|
2021-07-21 04:41:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_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`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-24 21:52:37 +03:00
|
|
|
## nixos.hostDefaults.exportedModules
|
|
|
|
modules to include in all hosts and export to nixosModules output
|
|
|
|
|
|
|
|
|
|
|
|
*_Type_*:
|
2021-10-13 15:01:49 +03:00
|
|
|
list of valid modules or anything convertible to it or path convertible to it
|
2021-09-24 21:52:37 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_Default_*
|
|
|
|
```
|
|
|
|
[]
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-21 04:41:00 +03:00
|
|
|
## nixos.hostDefaults.externalModules
|
2021-10-13 15:01:49 +03:00
|
|
|
The `externalModules` option has been removed.
|
2021-09-24 21:52:37 +03:00
|
|
|
Any modules that should be exported should be defined with the `exportedModules`
|
|
|
|
option and all other modules should just go into the `modules` option.
|
2021-07-21 04:41:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_Type_*:
|
2021-10-13 15:01:49 +03:00
|
|
|
list of valid modules or anything convertible to it
|
2021-07-21 04:41:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_Default_*
|
|
|
|
```
|
|
|
|
[]
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## nixos.hostDefaults.modules
|
2021-09-24 21:52:37 +03:00
|
|
|
modules to include that won't be exported
|
|
|
|
meant importing modules from external flakes
|
2021-07-21 04:41:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_Type_*:
|
2021-09-14 10:37:12 +03:00
|
|
|
list of valid modules or anything convertible to it or path convertible to it
|
2021-07-21 04:41:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_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_*:
|
2021-09-14 10:37:12 +03:00
|
|
|
list of valid modules or anything convertible to it or path convertible to it
|
2021-07-21 04:41:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_Default_*
|
|
|
|
```
|
|
|
|
[]
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## nixos.hosts.\<name\>.system
|
|
|
|
system for this host
|
|
|
|
|
|
|
|
|
|
|
|
*_Type_*:
|
|
|
|
null or system defined in `supportedSystems`
|
|
|
|
|
|
|
|
|
|
|
|
*_Default_*
|
|
|
|
```
|
|
|
|
null
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-03 04:56:08 +03:00
|
|
|
## nixos.hosts.\<name\>.tests
|
|
|
|
tests to run
|
|
|
|
|
|
|
|
|
|
|
|
*_Type_*:
|
2021-08-04 19:18:23 +03:00
|
|
|
list of valid NixOS test or path convertible to its or anything convertible to it
|
2021-08-03 04:56:08 +03:00
|
|
|
|
|
|
|
|
|
|
|
*_Default_*
|
|
|
|
```
|
|
|
|
[]
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
*_Example_*
|
|
|
|
```
|
2021-11-26 15:09:55 +03:00
|
|
|
{"_type":"literalExpression","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"}
|
2021-08-03 04:56:08 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2021-07-21 04:41:00 +03:00
|
|
|
## 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 {
|
2021-07-21 05:38:14 +03:00
|
|
|
profiles = digga.lib.rakeLeaves ./profiles;
|
2021-07-21 04:41:00 +03:00
|
|
|
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 {
|
2021-07-21 05:38:14 +03:00
|
|
|
profiles = digga.lib.rakeLeaves ./profiles;
|
2021-07-21 04:41:00 +03:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|