flake.auto-import.enable
Whether to enable enable auto-importing modules.
Type: boolean
Default:
false
Example:
true
Declared by:
flake.auto-import.addTo.flakeParts
Whether to enable add {modules} entries to {modules.{class}} (flake-parts extra module).
Type: boolean
Default:
false
Example:
true
Declared by:
flake.auto-import.addTo.modules
Whether to enable add {modules} entries to toplevel flake output (i.e. nixosModules, flakeModules).
Type: boolean
Default:
false
Example:
true
Declared by:
flake.auto-import.flake
Auto-imported flake-parts modules from {dir}
Type: submodule
Default:
{ }
Declared by:
flake.auto-import.flake.addTo.flakeParts
Whether to enable add {modules} entries to {modules.{class}} (flake-parts extra module).
Type: boolean
Default:
true
Example:
true
Declared by:
flake.auto-import.flake.addTo.modules
Whether to enable add {modules} entries to toplevel flake output (i.e. nixosModules, flakeModules).
Type: boolean
Default:
true
Example:
true
Declared by:
flake.auto-import.flake.all
all nixos modules from modules after being filtered by filterAll
Type: list of raw value
Default:
[]
Declared by:
flake.auto-import.flake.class
Class to set by default for imports
Type: string
Default:
"flake"
Example:
"homeManager"
Declared by:
flake.auto-import.flake.dir
If set, modules are raked and imported into modules.nixos
Type: null or absolute path
Default:
null
Example:
./nixosModules
Declared by:
flake.auto-import.flake.files
A recursive attrSet of file paths containing flake modules
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
flake.auto-import.flake.filterByPath
list of attr path lists in modules to remove from {all}
Type: list of list of string
Default:
[ ]
Example:
[
["virt" "microvm" "vm"]
]
Declared by:
flake.auto-import.flake.filterModules
If set, apply this filter function to auto-imported modules from {dir}
Type: function that evaluates to a(n) function that evaluates to a(n) boolean
Default:
n: c: !(hasPrefix "__" n)
Example:
_: _: true
Declared by:
flake.auto-import.flake.flakeArgs
When set to null, modules are imported purely by path.
Otherwise, all imported modules are mapped through import {module} {flakeArgs}.
This can allow all auto-imported to have access to your flake level args.
Type: null or unspecified value
Default:
defaults.flakeArgs
Example:
localFlake
Declared by:
flake.auto-import.flake.flattened
attrSet containing all imported module definitions.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
flake.auto-import.flake.flattened.<name>.__final
final importable module
Type: raw value
Default:
{ inherit (config) key _file _class imports; }
Declared by:
flake.auto-import.flake.flattened.<name>._class
{_class} to use in final import
Type: string
Default:
"flake"
Declared by:
flake.auto-import.flake.flattened.<name>._file
{_file} to use in final import
Type: absolute path
Default:
"flake.nix#flakeModules.‹name›"
Declared by:
flake.auto-import.flake.flattened.<name>.addToAll
add the module to {all}, enabled by default
Type: boolean
Default:
true
Declared by:
flake.auto-import.flake.flattened.<name>.imports
{imports} to use in final import
Type: list of raw value
Default:
if config.specialArgs == null
then [ config.module ]
else [ (import config.module config.specialArgs) ]
;
Declared by:
flake.auto-import.flake.flattened.<name>.key
{key} to use in final import
Type: string
Default:
"flake.nix#flakeModules.‹name›"
Declared by:
flake.auto-import.flake.flattened.<name>.module
path to module file, or inline module snippet
Type: absolute path or raw value or function that evaluates to a(n) raw value or function that evaluates to a(n) function that evaluates to a(n) raw value
Default:
{ }
Declared by:
flake.auto-import.flake.flattened.<name>.name
module name
Type: string
Default:
"‹name›"
Declared by:
flake.auto-import.flake.flattened.<name>.nameDashed
name with ‘-’ instead of ‘.’ path, used for adding to flakeModules
Type: string
Default:
"‹name›"
Declared by:
flake.auto-import.flake.flattened.<name>.path
file path of module relative to import dir
Type: list of string
Default:
[
"‹name›"
]
Declared by:
flake.auto-import.flake.flattened.<name>.specialArgs
path to module
Type: null or unspecified value
Default:
null
Declared by:
flake.auto-import.flake.modules
Ready-to-import modules
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
flake.auto-import.flakeArgs
When set to null, modules are imported purely by path.
Otherwise, all imported modules are mapped through import {module} {flakeArgs}.
This can allow all auto-imported to have access to your flake level args.
Type: null or unspecified value
Default:
defaults.flakeArgs
Example:
localFlake
Declared by:
flake.auto-import.homeManager
Auto-imported home-manager modules from {dir}
Type: submodule
Default:
{ }
Declared by:
flake.auto-import.homeManager.addTo.flakeParts
Whether to enable add {modules} entries to {modules.{class}} (flake-parts extra module).
Type: boolean
Default:
true
Example:
true
Declared by:
flake.auto-import.homeManager.addTo.modules
Whether to enable add {modules} entries to toplevel flake output (i.e. nixosModules, flakeModules).
Type: boolean
Default:
true
Example:
true
Declared by:
flake.auto-import.homeManager.all
all nixos modules from modules after being filtered by filterAll
Type: list of raw value
Default:
[]
Declared by:
flake.auto-import.homeManager.class
Class to set by default for imports
Type: string
Default:
"homeManager"
Example:
"homeManager"
Declared by:
flake.auto-import.homeManager.dir
If set, modules are raked and imported into modules.nixos
Type: null or absolute path
Default:
null
Example:
./nixosModules
Declared by:
flake.auto-import.homeManager.files
A recursive attrSet of file paths containing homeManager modules
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
flake.auto-import.homeManager.filterByPath
list of attr path lists in modules to remove from {all}
Type: list of list of string
Default:
[ ]
Example:
[
["virt" "microvm" "vm"]
]
Declared by:
flake.auto-import.homeManager.filterModules
If set, apply this filter function to auto-imported modules from {dir}
Type: function that evaluates to a(n) function that evaluates to a(n) boolean
Default:
n: c: !(hasPrefix "__" n)
Example:
_: _: true
Declared by:
flake.auto-import.homeManager.flakeArgs
When set to null, modules are imported purely by path.
Otherwise, all imported modules are mapped through import {module} {flakeArgs}.
This can allow all auto-imported to have access to your flake level args.
Type: null or unspecified value
Default:
defaults.flakeArgs
Example:
localFlake
Declared by:
flake.auto-import.homeManager.flattened
attrSet containing all imported module definitions.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
flake.auto-import.homeManager.flattened.<name>.__final
final importable module
Type: raw value
Default:
{ inherit (config) key _file _class imports; }
Declared by:
flake.auto-import.homeManager.flattened.<name>._class
{_class} to use in final import
Type: string
Default:
"homeManager"
Declared by:
flake.auto-import.homeManager.flattened.<name>._file
{_file} to use in final import
Type: absolute path
Default:
"flake.nix#homeManagerModules.‹name›"
Declared by:
flake.auto-import.homeManager.flattened.<name>.addToAll
add the module to {all}, enabled by default
Type: boolean
Default:
true
Declared by:
flake.auto-import.homeManager.flattened.<name>.imports
{imports} to use in final import
Type: list of raw value
Default:
if config.specialArgs == null
then [ config.module ]
else [ (import config.module config.specialArgs) ]
;
Declared by:
flake.auto-import.homeManager.flattened.<name>.key
{key} to use in final import
Type: string
Default:
"flake.nix#homeManagerModules.‹name›"
Declared by:
flake.auto-import.homeManager.flattened.<name>.module
path to module file, or inline module snippet
Type: absolute path or raw value or function that evaluates to a(n) raw value or function that evaluates to a(n) function that evaluates to a(n) raw value
Default:
{ }
Declared by:
flake.auto-import.homeManager.flattened.<name>.name
module name
Type: string
Default:
"‹name›"
Declared by:
flake.auto-import.homeManager.flattened.<name>.nameDashed
name with ‘-’ instead of ‘.’ path, used for adding to homeManagerModules
Type: string
Default:
"‹name›"
Declared by:
flake.auto-import.homeManager.flattened.<name>.path
file path of module relative to import dir
Type: list of string
Default:
[
"‹name›"
]
Declared by:
flake.auto-import.homeManager.flattened.<name>.specialArgs
path to module
Type: null or unspecified value
Default:
null
Declared by:
flake.auto-import.homeManager.modules
Ready-to-import modules
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
flake.auto-import.nixos
Auto-imported nixos modules from {dir}
NixOS modules set, less strict that flake.nixosModules since it can be recursiveAttrsOf config.
Used to allow arbitrary nixosModule attrsets for exporting, to allow for grouping.
Type: submodule
Default:
{ }
Declared by:
flake.auto-import.nixos.addTo.flakeParts
Whether to enable add {modules} entries to {modules.{class}} (flake-parts extra module).
Type: boolean
Default:
true
Example:
true
Declared by:
flake.auto-import.nixos.addTo.modules
Whether to enable add {modules} entries to toplevel flake output (i.e. nixosModules, flakeModules).
Type: boolean
Default:
true
Example:
true
Declared by:
flake.auto-import.nixos.all
all nixos modules from modules after being filtered by filterAll
Type: list of raw value
Default:
[]
Declared by:
flake.auto-import.nixos.class
Class to set by default for imports
Type: string
Default:
"nixos"
Example:
"homeManager"
Declared by:
flake.auto-import.nixos.dir
If set, modules are raked and imported into modules.nixos
Type: null or absolute path
Default:
null
Example:
./nixosModules
Declared by:
flake.auto-import.nixos.files
A recursive attrSet of file paths containing nixos modules
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
flake.auto-import.nixos.filterByPath
list of attr path lists in modules to remove from {all}
Type: list of list of string
Default:
[ ]
Example:
[
["virt" "microvm" "vm"]
]
Declared by:
flake.auto-import.nixos.filterModules
If set, apply this filter function to auto-imported modules from {dir}
Type: function that evaluates to a(n) function that evaluates to a(n) boolean
Default:
n: c: !(hasPrefix "__" n)
Example:
_: _: true
Declared by:
flake.auto-import.nixos.flakeArgs
When set to null, modules are imported purely by path.
Otherwise, all imported modules are mapped through import {module} {flakeArgs}.
This can allow all auto-imported to have access to your flake level args.
Type: null or unspecified value
Default:
defaults.flakeArgs
Example:
localFlake
Declared by:
flake.auto-import.nixos.flattened
attrSet containing all imported module definitions.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
flake.auto-import.nixos.flattened.<name>.__final
final importable module
Type: raw value
Default:
{ inherit (config) key _file _class imports; }
Declared by:
flake.auto-import.nixos.flattened.<name>._class
{_class} to use in final import
Type: string
Default:
"nixos"
Declared by:
flake.auto-import.nixos.flattened.<name>._file
{_file} to use in final import
Type: absolute path
Default:
"flake.nix#nixosModules.‹name›"
Declared by:
flake.auto-import.nixos.flattened.<name>.addToAll
add the module to {all}, enabled by default
Type: boolean
Default:
true
Declared by:
flake.auto-import.nixos.flattened.<name>.imports
{imports} to use in final import
Type: list of raw value
Default:
if config.specialArgs == null
then [ config.module ]
else [ (import config.module config.specialArgs) ]
;
Declared by:
flake.auto-import.nixos.flattened.<name>.key
{key} to use in final import
Type: string
Default:
"flake.nix#nixosModules.‹name›"
Declared by:
flake.auto-import.nixos.flattened.<name>.module
path to module file, or inline module snippet
Type: absolute path or raw value or function that evaluates to a(n) raw value or function that evaluates to a(n) function that evaluates to a(n) raw value
Default:
{ }
Declared by:
flake.auto-import.nixos.flattened.<name>.name
module name
Type: string
Default:
"‹name›"
Declared by:
flake.auto-import.nixos.flattened.<name>.nameDashed
name with ‘-’ instead of ‘.’ path, used for adding to nixosModules
Type: string
Default:
"‹name›"
Declared by:
flake.auto-import.nixos.flattened.<name>.path
file path of module relative to import dir
Type: list of string
Default:
[
"‹name›"
]
Declared by:
flake.auto-import.nixos.flattened.<name>.specialArgs
path to module
Type: null or unspecified value
Default:
null
Declared by:
flake.auto-import.nixos.modules
Ready-to-import modules
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
flake.docs.enable
Whether to enable enable docs integration.
Type: boolean
Default:
false
Example:
true
Declared by:
flake.docs.defaults
default values to pass into sites
Type: submodule
Default:
{ }
Declared by:
flake.docs.defaults.hostOptions
default options to use for documentation generation
Type: lazy attribute set of raw value
Default:
(import (localFlake.inputs.nixpkgs.outPath + "/nixos/lib/eval-config.nix") {
# Overriden explicitly here, this would include all modules from NixOS otherwise.
# See: docs of eval-config.nix for more details
modules = [];
})
.options;
Example:
self.nixosConfigurations.myhost.options
Declared by:
flake.docs.defaults.nuscht-search.baseHref
The directory to where the search is going to be deployed relative to the domain. Defaults to /.
Type: string
Default:
"/"
Example:
"/search/"
Declared by:
flake.docs.defaults.nuscht-search.customTheme
Custom theme file that replaces styles.scss in upstream package
Type: null or path in the Nix store
Default:
null
Example:
pkgs.writeText "styles.scss" ''''
@import "theme";
@include theme();
@import "scss/kanagawa";
:root {
--f-color: hsl(214, 41.1%, 78.0%); // lightsteelblue
}
* {
box-sizing: border-box;
background: #101010;
}
pre {
white-space: pre-wrap;
}
''''
Declared by:
flake.docs.defaults.nuscht-search.title
The title on the top left. Defaults to NüschtOS Search.
Type: string
Default:
"Custom Options Search"
Declared by:
flake.docs.defaults.substitution.gitRepoFilePath
Base URL of git repo file browser, used for rewriting urls to source to the correct URL
Type: string
Default:
"http://gitea.local.testing/tree/master"
Example:
"https://github.com/kraftnix/provision-nix/tree/master/"
Declared by:
flake.docs.defaults.substitution.gitRepoUrl
URL of git repo, you need to set this.
Type: non-empty string
Default:
"http://gitea.local.testing"
Example:
"https://github.com/kraftnix/provision-nix"
Declared by:
flake.docs.defaults.substitution.outPath
outPath of the flake, used for rewriting /nix/store/ hardlinks in generated output from mkOptionsDoc
Type: absolute path
Default:
"/nix/store/c999lnyb6dcvwarny86qwq2k95ln16z7-source"
Example:
self.outPath
Declared by:
flake.docs.sites
mdbook sites to generate, optionally generating module options documentation with mkOptionsDoc
The mdbook site for this repository can be found site.nix
Options documentation generated is added to {mdbook.path}/options/{name}-options.md before mdbook build is run.
This means that running mdbook locally (useful when writing docs due to hot-reload), generated options documentation won’t be avaiable.
Additionally, in order to use options generated from docgen, you must include them in your mdbook SUMMARY.md
or else mdbook won’t include it during its build.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
provision-nix-docs-local = {
mdbook.src = ./.;
defaults = {
hostOptions = self.nixosConfigurations.basic.options;
substitution.outPath = self.outPath;
substitution.gitRepoUrl = "https://github.com/kraftnix/provision-nix";
# automatically set by above path
# substitution.gitRepoFilePath = "https://github.com/kraftnix/provision-nix/tree/master/";
};
homepage = {
url = "http://localhost:1111";
body = "Homepage";
};
docgen.nixos-nftables.filter = option:
builtins.elemAt option.loc 0 == "networking"
&&
builtins.elemAt option.loc 1 == "nftables"
&&
builtins.elemAt option.loc 2 == "gen"
;
};
}
Declared by:
flake.docs.sites.<name>.enable
Whether to enable enable docs integration.
Type: boolean
Default:
true
Example:
true
Declared by:
flake.docs.sites.<name>.defaults
default values to pass into sites
Type: submodule
Default:
{
# use a host from your config and optionally pass extra modules
hostOptions =
(import (localFlake.self.nixosConfigurations.basic.pkgs.path + "/nixos/lib/eval-config.nix") {
# Overriden explicitly here, this would include all modules from NixOS otherwise.
# See: docs of eval-config.nix for more details
modules = [];
}).options;
# set some nuscht-search defaults
nuscht-search = {
baseHref = "/";
customTheme = null;
title = "Custom Options Search";
};
# substitutions for nuscht-search and options references
substitution = {
gitRepoUrl = "https://github.com/kraftnix/provision-nix";
# by default, adds "/tree/master" to `gitRepoUrl`
# gitRepoFilePath = "https://github.com/kraftnix/provision-nix/tree/master";
# by default: is set to current flake's outPath
# outPath = self.outPath;
};
}
Declared by:
flake.docs.sites.<name>.defaults.hostOptions
default options to use for documentation generation
Type: lazy attribute set of raw value
Default:
(import (localFlake.inputs.nixpkgs.outPath + "/nixos/lib/eval-config.nix") {
# Overriden explicitly here, this would include all modules from NixOS otherwise.
# See: docs of eval-config.nix for more details
modules = [];
})
.options;
Example:
self.nixosConfigurations.myhost.options
Declared by:
flake.docs.sites.<name>.defaults.nuscht-search.baseHref
The directory to where the search is going to be deployed relative to the domain. Defaults to /.
Type: string
Default:
"/"
Example:
"/search/"
Declared by:
flake.docs.sites.<name>.defaults.nuscht-search.customTheme
Custom theme file that replaces styles.scss in upstream package
Type: null or path in the Nix store
Default:
null
Example:
pkgs.writeText "styles.scss" ''''
@import "theme";
@include theme();
@import "scss/kanagawa";
:root {
--f-color: hsl(214, 41.1%, 78.0%); // lightsteelblue
}
* {
box-sizing: border-box;
background: #101010;
}
pre {
white-space: pre-wrap;
}
''''
Declared by:
flake.docs.sites.<name>.defaults.nuscht-search.title
The title on the top left. Defaults to NüschtOS Search.
Type: string
Default:
"Custom Options Search"
Declared by:
flake.docs.sites.<name>.defaults.substitution.gitRepoFilePath
Base URL of git repo file browser, used for rewriting urls to source to the correct URL
Type: string
Default:
"http://gitea.local.testing/tree/master"
Example:
"https://github.com/kraftnix/provision-nix/tree/master/"
Declared by:
flake.docs.sites.<name>.defaults.substitution.gitRepoUrl
URL of git repo, you need to set this.
Type: non-empty string
Default:
"http://gitea.local.testing"
Example:
"https://github.com/kraftnix/provision-nix"
Declared by:
flake.docs.sites.<name>.defaults.substitution.outPath
outPath of the flake, used for rewriting /nix/store/ hardlinks in generated output from mkOptionsDoc
Type: absolute path
Default:
"/nix/store/c999lnyb6dcvwarny86qwq2k95ln16z7-source"
Example:
self.outPath
Declared by:
flake.docs.sites.<name>.docgen
Tranforms modules options into markdown files.
Options from a host, or evalModules can be provided, and custom
filters can be applied to generate only specific options.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
filter = option:
builtins.elemAt option.loc 0 == "networking"
&&
builtins.elemAt option.loc 1 == "nftables"
;
}
Declared by:
flake.docs.sites.<name>.docgen.<name>.enable
Whether to enable enable options docs generation.
Type: boolean
Default:
true
Example:
true
Declared by:
flake.docs.sites.<name>.docgen.<name>.filter
filter to apply to options
Type: function that evaluates to a(n) boolean
Default:
<function>
Example:
# filter only `networking.nftables` options
option:
builtins.elemAt option.loc 0 == "networking"
&&
builtins.elemAt option.loc 1 == "nftables"
Declared by:
flake.docs.sites.<name>.docgen.<name>.hostOptions
host to use for options evaluation
Type: lazy attribute set of raw value
Default:
defaults.hostOptions
Example:
# gather `flake-parts` options from current flake
flake-parts-lib.evalFlakeModule
{ inputs.self = self; }
{
imports = [ ./flakeModules/my-flake-parts-module.nix ];
systems = [ (throw "The `systems` option value is not available when generating documentation. This is generally caused by a missing `defaultText` on one or more options in the trace. Please run this evaluation with `--show-trace`, look for `while evaluating the default value of option` and add a `defaultText` to the one or more of the options involved.") ];
}).options
Declared by:
flake.docs.sites.<name>.docgen.<name>.out.name
name of markdown file containing options
Type: string
Default:
"‹name›-options.md"
Declared by:
flake.docs.sites.<name>.docgen.<name>.substitution.gitRepoFilePath
Base URL of git repo file browser, used for rewriting urls to source to the correct URL
Type: string
Default:
"https://gitea.home.lan/kraftnix/provision-nix/src/branch/master/"
Example:
"https://github.com/kraftnix/provision-nix/tree/master/"
Declared by:
flake.docs.sites.<name>.docgen.<name>.substitution.gitRepoUrl
URL of git repo
Type: string
Default:
"https://gitea.home.lan/kraftnix/provision-nix"
Example:
"https://github.com/kraftnix/provision-nix"
Declared by:
flake.docs.sites.<name>.docgen.<name>.substitution.outPath
outPath of the flake, used for rewriting /nix/store/ hardlinks in generated output from mkOptionsDoc
Type: absolute path
Default:
"/nix/store/c999lnyb6dcvwarny86qwq2k95ln16z7-source"
Example:
self.outPath
Declared by:
flake.docs.sites.<name>.homepage.body
HTML Snippet inside <a> link used in documentation to point to home page.
Type: string
Default:
"Home"
Example:
"Homepage"
Declared by:
flake.docs.sites.<name>.homepage.siteBase
Base URL of docs
Type: string
Default:
"/"
Example:
"/projects/provision-nix/"
Declared by:
flake.docs.sites.<name>.homepage.url
Homepage of the website (for when siteBase is not at root)
Type: string
Default:
"http://localhost:1111"
Example:
"https://mydocswebsite.com"
Declared by:
flake.docs.sites.<name>.mdbook.path
path in src where mdbook docs are located
Type: string
Default:
"docs"
Declared by:
flake.docs.sites.<name>.mdbook.src
source directory of mdBook documentation
Type: absolute path
Default:
modules/docs
Example:
./.
Declared by:
flake.docs.sites.<name>.name
site name
Type: string
Default:
"‹name›"
Example:
"provision-nix"
Declared by:
flake.hosts
Generate nixosConfigurations with defaults:
- auto-import host configurations from a directory
- define default
modules,overlays,specialArgsfor hosts - define extra options for colmena, deploy-rs integration
Type: submodule
Default:
{ }
Declared by:
flake.hosts.colmena
Colmena options to add to each host.
Type: raw value
Default:
{ }
Example:
{
targetPort = 22;
targetUser = "deploy";
}
Declared by:
flake.hosts.configs
Define hosts inline, host configurations are auto-imported from {hostsDir} and added to `modules``;
- modules: extra modules, auto-adds modules from
defaults.modules - overlays: extra overlays, auto-adds overlays from
overlays - nixpkgs: pkgs set, auto-adds from
channels.{system}.nixpkgs.pkgs - system
- specialArgs
- deploy options (colmena, deploy-rs)
Type: lazy attribute set of (submodule)
Default:
{ }
Declared by:
flake.hosts.configs.<name>.enable
whether to generate flake config for nixosConfigurations, colmena and deploy
Type: boolean
Default:
true
Declared by:
flake.hosts.configs.<name>.colmena
extra arguments to add in flake colmena.<host>.deployment
Type: attribute set of anything
Default:
{ }
Example:
{
targetPort = 22;
targetUser = "deploy";
}
Declared by:
flake.hosts.configs.<name>.deploy
extra arguments to add in flake deploy.nodes.<host>
Type: attribute set of anything
Default:
{ }
Example:
{
fastConnection = true;
sshUser = "deploy";
magicRollback = true;
autoRollback = true;
}
Declared by:
flake.hosts.configs.<name>.hostname
hostname to set for networking.hostName in hosts nixosConfiguration
Type: string
Default:
"‹name›"
Declared by:
flake.hosts.configs.<name>.modules
extra nixos modules to eval for host.
Type: list of raw value
Default:
[ ]
Example:
[
inputs.provision.nixosModules.provision-scripts
{ networking.firewall.enable = lib.mkForce true; }
];
Declared by:
flake.hosts.configs.<name>.nixpkgs
The Nixpkgs to use for this host.
- if set to a
string, then a channel’s pkgs will be looked up inflake.channels.{system}.{name}.pkgs - otherwise, can be set to a
pkgsdirectly.
By default uses nixpkgs channel in channels option.
Type: string or Nixpkgs package set
Default:
"nixpkgs"
Example:
"nixpkgs-stable"
Declared by:
flake.hosts.configs.<name>.overlays
extra overlays to add for host
Type: list of (nixpkgs overlay)
Default:
[ ]
Example:
[
inputs.provision-nix.overlays.lnav
]
Declared by:
flake.hosts.configs.<name>.rendered
Post eval nixosConfiguration field, added to nixosConfigurations.
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
flake.hosts.configs.<name>.self
reference to current flake-parts self
Type: lazy attribute set of unspecified value
Default:
self
Example:
self
Declared by:
flake.hosts.configs.<name>.specialArgs
extra arguments to add to specialArgs in eval-config.nix
Type: lazy attribute set of raw value
Default:
{ }
Example:
{
inherit self inputs;
}
Declared by:
flake.hosts.configs.<name>.system
system for host.
Type: one of “i686-cygwin”, “x86_64-cygwin”, “x86_64-darwin”, “aarch64-darwin”, “i686-freebsd”, “x86_64-freebsd”, “aarch64-freebsd”, “aarch64-genode”, “i686-genode”, “x86_64-genode”, “x86_64-solaris”, “javascript-ghcjs”, “aarch64-linux”, “armv5tel-linux”, “armv6l-linux”, “armv7a-linux”, “armv7l-linux”, “i686-linux”, “loongarch64-linux”, “m68k-linux”, “microblaze-linux”, “microblazeel-linux”, “mips-linux”, “mips64-linux”, “mips64el-linux”, “mipsel-linux”, “powerpc64-linux”, “powerpc64le-linux”, “riscv32-linux”, “riscv64-linux”, “s390-linux”, “s390x-linux”, “x86_64-linux”, “mmix-mmixware”, “aarch64-netbsd”, “armv6l-netbsd”, “armv7a-netbsd”, “armv7l-netbsd”, “i686-netbsd”, “m68k-netbsd”, “mipsel-netbsd”, “powerpc-netbsd”, “riscv32-netbsd”, “riscv64-netbsd”, “x86_64-netbsd”, “aarch64_be-none”, “aarch64-none”, “arm-none”, “armv6l-none”, “avr-none”, “i686-none”, “microblaze-none”, “microblazeel-none”, “mips-none”, “mips64-none”, “msp430-none”, “or1k-none”, “m68k-none”, “powerpc-none”, “powerpcle-none”, “riscv32-none”, “riscv64-none”, “rx-none”, “s390-none”, “s390x-none”, “vc4-none”, “x86_64-none”, “i686-openbsd”, “x86_64-openbsd”, “x86_64-redox”, “wasm64-wasi”, “wasm32-wasi”, “aarch64-windows”, “x86_64-windows”, “i686-windows”
Default:
"x86_64-linux"
Example:
"aarch64-linux"
Declared by:
flake.hosts.defaults
default options for generating hosts with genNixos
Type: submodule
Default:
{ }
Example:
{
modules = [
{ networking.firewall.enable = lib.mkForce true; }
];
overlays = [
inputs.provision-nix.overlays.lnav
];
specialArgs = {
inherit self inputs;
};
}
Declared by:
flake.hosts.defaults.colmena
extra arguments to add in flake colmena.<host>.deployment
Type: attribute set of anything
Default:
{ }
Example:
{
targetPort = 22;
targetUser = "deploy";
}
Declared by:
flake.hosts.defaults.deploy
extra arguments to add in flake deploy.nodes.<host>
Type: attribute set of anything
Default:
{ }
Example:
{
fastConnection = true;
sshUser = "deploy";
magicRollback = true;
autoRollback = true;
}
Declared by:
flake.hosts.defaults.modules
extra nixos modules to eval for host.
Type: list of raw value
Default:
[ ]
Example:
[
inputs.provision.nixosModules.provision-scripts
{ networking.firewall.enable = lib.mkForce true; }
];
Declared by:
flake.hosts.defaults.nixpkgs
The Nixpkgs to use for this host.
- if set to a
string, then a channel’s pkgs will be looked up inflake.channels.{system}.{name}.pkgs - otherwise, can be set to a
pkgsdirectly.
By default uses nixpkgs channel in channels option.
Type: string or Nixpkgs package set
Default:
"nixpkgs"
Example:
"nixpkgs-stable"
Declared by:
flake.hosts.defaults.overlays
extra overlays to add for host
Type: list of (nixpkgs overlay)
Default:
[ ]
Example:
[
inputs.provision-nix.overlays.lnav
]
Declared by:
flake.hosts.defaults.self
reference to current flake-parts self
Type: lazy attribute set of unspecified value
Default:
self
Example:
self
Declared by:
flake.hosts.defaults.specialArgs
extra arguments to add to specialArgs in eval-config.nix
Type: lazy attribute set of raw value
Default:
{ }
Example:
{
inherit self inputs;
}
Declared by:
flake.hosts.defaults.system
system for host.
Type: one of “i686-cygwin”, “x86_64-cygwin”, “x86_64-darwin”, “aarch64-darwin”, “i686-freebsd”, “x86_64-freebsd”, “aarch64-freebsd”, “aarch64-genode”, “i686-genode”, “x86_64-genode”, “x86_64-solaris”, “javascript-ghcjs”, “aarch64-linux”, “armv5tel-linux”, “armv6l-linux”, “armv7a-linux”, “armv7l-linux”, “i686-linux”, “loongarch64-linux”, “m68k-linux”, “microblaze-linux”, “microblazeel-linux”, “mips-linux”, “mips64-linux”, “mips64el-linux”, “mipsel-linux”, “powerpc64-linux”, “powerpc64le-linux”, “riscv32-linux”, “riscv64-linux”, “s390-linux”, “s390x-linux”, “x86_64-linux”, “mmix-mmixware”, “aarch64-netbsd”, “armv6l-netbsd”, “armv7a-netbsd”, “armv7l-netbsd”, “i686-netbsd”, “m68k-netbsd”, “mipsel-netbsd”, “powerpc-netbsd”, “riscv32-netbsd”, “riscv64-netbsd”, “x86_64-netbsd”, “aarch64_be-none”, “aarch64-none”, “arm-none”, “armv6l-none”, “avr-none”, “i686-none”, “microblaze-none”, “microblazeel-none”, “mips-none”, “mips64-none”, “msp430-none”, “or1k-none”, “m68k-none”, “powerpc-none”, “powerpcle-none”, “riscv32-none”, “riscv64-none”, “rx-none”, “s390-none”, “s390x-none”, “vc4-none”, “x86_64-none”, “i686-openbsd”, “x86_64-openbsd”, “x86_64-redox”, “wasm64-wasi”, “wasm32-wasi”, “aarch64-windows”, “x86_64-windows”, “i686-windows”
Default:
"x86_64-linux"
Example:
"aarch64-linux"
Declared by:
flake.hosts.deploy-rs
Default options for deploy-rs’s global options (not including nodes).
Type: raw value
Default:
{ }
Example:
{
fastConnection = true;
sshUser = "deploy";
magicRollback = true;
autoRollback = true;
}
Declared by:
flake.hosts.hostsDir
If set, then a rakeLeaves is performed on the path, and entries are used
to seed flake.hosts.configs.
toplevel default file is ignored ({hostsDir}/default.nix).
Type: null or absolute path
Default:
null
Example:
./hosts
Declared by:
flake.hosts.overlays
List of overlays to add to all hosts.
Type: list of (nixpkgs overlay)
Default:
[ ]
Example:
[
(final: prev: {
rofi-calc = prev.rofi-calc.override {
rofi-unwrapped = final.rofi-wayland-unwrapped;
};
})
inputs.provision-nix.overlays.lnav
]
Declared by:
flake.hosts.rendered
Post eval nixosConfiguration’s config field, useful for introspection.
Type: lazy attribute set of raw value (read only)
Default:
{ }
Declared by:
flake.hosts.toplevels
Post eval nixosConfiguration’s config.system.build.toplevel field, useful for nix-fast-build.
nix-fast-build -f .#hosts.toplevels
Type: lazy attribute set of raw value (read only)
Default:
{ }
Declared by:
flake.lib
Flake level lib option.
Type: attribute set of raw value
Default:
{ }
Example:
{
mkEnableTrue = description: lib.mkEnableOption description // { default = true; };
}
Declared by:
flake.profiles
NixOS profiles.
You may use this for reusable snippets pieces of pure configuration (i.e. without options).
Type: lazy attribute set of unspecified value
Default:
{ }
Example:
{
profiles = {
inline-example = { lib, config, ... }: {
networking.firewall.enable = lib.mkForce false;
networking.domain = lib.mkForce config.networking.hostName;
};
server = ./profiles/server.nix;
};
}
Declared by:
perSystem.packagesGroups
An attribute set of packages to be built by nix build.
nix build .#<name> will build packages.<name>.
Type: lazy attribute set of lazy attribute set of package
Default:
{ }
Example:
{
nushellPlugins = {
explore = pkgs.callPackage ./nushell_plugin_explore.nix {};
dbus = pkgs.callPackage ./nushell_plugin_dbus.nix {};
};
}
Declared by:
perSystem.channels
NixOS Channels (pkgs) to allow hosts to use.
The nixpkgs channel is always created, using your inputs.nixpkgs, but this is overridable.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
stable = {};
latest.inputName = "nixpkgs-master";
nixpkgs = {
config.permittedInsecurePackages = [ "electron-28.3.3" ];
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steamcmd"
"steam-run"
];
overlays = [
self.overlays.channels
(final: prev: {
inherit (final.channels.stable)
prometheus
vector
;
})
inputs.provision-nix.overlays.lnav
];
};
}
Declared by:
perSystem.channels.<name>.addChannelsOverlay
insert self channels overlay to each channel
Type: boolean
Default:
true
Example:
false
Declared by:
perSystem.channels.<name>.config
Nixpkgs Config to evaluate base channel with, passed into import nixpkgs { config }
Type: raw value
Default:
{
allowUnfree = false;
}
Example:
{
permittedInsecurePackages = [ "electron-28.3.3" ];
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-run"
];
}
Declared by:
perSystem.channels.<name>.extraArgs
Overrides configuration arguments to pass into import nixpkgs
Type: raw value
Default:
{ }
Declared by:
perSystem.channels.<name>.input
Flake nixpkgs input to use as channel base.
Type: raw value
Default:
{ }
Declared by:
perSystem.channels.<name>.inputName
Name of nixpkgs input to use as channel base.
Type: string
Default:
"‹name›"
Declared by:
perSystem.channels.<name>.overlays
List of overlays to apply to nixpkgs from input.
Type: list of (nixpkgs overlay)
Default:
[ ]
Declared by:
perSystem.channels.<name>.pkgs
Final pkgs to use for hosts.
Type: Nixpkgs package set
Default:
{ }
Declared by:
perSystem.nuscht-search
Nüscht Search integration which combines all options in docgen into scopes
Options from a host, or evalModules can be provided, and custom
filters can be applied to generate only specific options.
Type: attribute set of (submodule)
Default:
{ }
Example:
my-search = {
title = "My Custom Options Search";
baseHref = "/search/";
scopes = {
customScope = {
name = "NixOS Modules";
modules = [ self.inputs.nixos-modules.nixosModule ];
urlPrefix = "https://github.com/NuschtOS/nixos-modules/blob/main/";
};
};
}
Declared by:
perSystem.nuscht-search.<name>.enable
Whether to enable enable nuscht-search generation.
Type: boolean
Default:
true
Example:
true
Declared by:
perSystem.nuscht-search.<name>.baseHref
The directory to where the search is going to be deployed relative to the domain. Defaults to /.
Type: string
Default:
"/"
Example:
"/search/"
Declared by:
perSystem.nuscht-search.<name>.customTheme
Custom theme file that replaces styles.scss in upstream package
Type: null or absolute path
Default:
null
Example:
pkgs.writeText "styles.scss" ''''
@import "theme";
@include theme();
@import "scss/kanagawa";
:root {
--f-color: hsl(214, 41.1%, 78.0%); // lightsteelblue
}
* {
box-sizing: border-box;
background: #101010;
}
pre {
white-space: pre-wrap;
}
''''
Declared by:
perSystem.nuscht-search.<name>.multiSearch
final output of mkMultiSearch
Type: path in the Nix store
Declared by:
perSystem.nuscht-search.<name>.scopes
an attrset of scope attributes which each takes name, modules, optionsJSON, optionsPrefix or urlPrefix option.
used as args for mkMultiSearch.
Automatically uses options from docgen.
see https://github.com/NuschtOS/search?tab=readme-ov-file#explanation-of-options for more information
Type: attribute set of (submodule)
Default:
{ }
Declared by:
perSystem.nuscht-search.<name>.scopes.<name>.enable
Whether to enable enable inclusion of scope in module.
Type: boolean
Default:
true
Example:
true
Declared by:
perSystem.nuscht-search.<name>.scopes.<name>.modules
A list of NixOS modules as an attrset or file similar to the nixosSystem function. Exclusive with optionsJSON.
Type: null or (list of raw value)
Default:
null
Example:
[ self.inputs.nixos-modules.nixosModule ]
Declared by:
perSystem.nuscht-search.<name>.scopes.<name>.name
Scope name
Type: string
Default:
"‹name›"
Example:
"Custom Search"
Declared by:
perSystem.nuscht-search.<name>.scopes.<name>.optionsJSON
Path to a pre-generated options.json file. Exclusive with modules.
Type: null or absolute path
Default:
null
Example:
./path/to/options.json
Declared by:
perSystem.nuscht-search.<name>.scopes.<name>.optionsJSONPackage
optional output of pkgs.nixosOptionsDoc
Type: null or package
Default:
null
Declared by:
perSystem.nuscht-search.<name>.scopes.<name>.optionsPrefix
A static prefix to append to all options. An extra dot is always appended. Defaults to being empty.
Type: null or string
Default:
null
Example:
"programs.example"
Declared by:
perSystem.nuscht-search.<name>.scopes.<name>.urlPrefix
The prefix which is prepended to the declaration link. This is usually a link to a git.
Type: string
Default:
""
Example:
"https://git.example.com/blob/main/"
Declared by:
perSystem.nuscht-search.<name>.title
The title on the top left. Defaults to NüschtOS Search.
Type: string
Default:
"‹name› Options Search"
Declared by:
perSystem.provision
Provision shells module.
Allows configuring formatter, pre-commit and devshells.default.
Type: submodule
Default:
{ }
Example:
{
enable = true;
# enableDefaults = true;
formatter = {
enable = true;
name = "alejandra";
enablePreCommmit = true;
};
pre-commit.hooks.nil.enable = true;
}
Declared by:
perSystem.provision.enable
Whether to enable enable provision-nix shell.
Type: boolean
Default:
false
Example:
true
Declared by:
perSystem.provision.enableDefaults
Whether to enable enables pre-commit hook + a default formatter.
Type: boolean
Default:
false
Example:
true
Declared by:
perSystem.provision.deploy
Configure which deploy packages to add.
Type: submodule
Default:
{ }
Declared by:
perSystem.provision.deploy.enable
Whether to enable enable adding deploy packages.
Type: boolean
Default:
true
Example:
true
Declared by:
perSystem.provision.deploy.packages
packages to add to devshell
Type: list of package
Default:
[ ]
Example:
[ inputs.colmena.packages.$\{pkgs.system}.colmena ]
Declared by:
perSystem.provision.formatter
Configure default formatter for flake, optionally add as a pre-commit hook.
Type: submodule
Default:
{ }
Declared by:
perSystem.provision.formatter.enable
Whether to enable enable setting formatter.
Type: boolean
Default:
false
Example:
true
Declared by:
perSystem.provision.formatter.enablePreCommit
Whether to enable adds formatter to pre-commit hook.
Type: boolean
Default:
false
Example:
true
Declared by:
perSystem.provision.formatter.package
optional formatter package to use, attempts to infer from name.
Type: null or package
Default:
null
Declared by:
perSystem.provision.formatter.name
optional formatter package to use, attempts to infer from name.
Type: string
Default:
""
Declared by:
perSystem.provision.pre-commit.enable
Whether to enable enable pre-commit hooks integration from git-hooks.nix.
Type: boolean
Default:
false
Example:
true
Declared by:
perSystem.provision.pre-commit.formatHook
format hook from provision.formatter option
Type: attribute set of raw value
Default:
{ }
Declared by:
perSystem.provision.pre-commit.hooks
hooks to passthrough to pre-commit.settings.hooks
Type: attribute set of raw value
Default:
{ }
Declared by:
perSystem.scripts
Generate scripts from different shells from string snippets, files, or nushell modules.
Enabled scripts are added to packages.{system} by name if scripts.addToPackages is set.
Type: submodule
Default:
{ }
Example:
{
perSystem = { ... }: {
scripts = {
enable = true;
addToPackages = true; # default
defaultShell = "nu"; # default
scripts = {
my-test-script.text = "ls -l";
my-test-script-bash-test.shell = "bash";
my-test-script-bash-test.text = "ls -la";
my-test-script-env-has.inputs = [pkgs.afetch];
my-test-script-env-has.text = ''
def main [ var ] {
print $"Env ($var) present: (envHas $var)"
afetch
}
'';
};
};
};
}
Declared by:
perSystem.scripts.enable
Whether to enable enable scripts integration.
Type: boolean
Default:
true
Example:
true
Declared by:
perSystem.scripts.__enabledScripts
enabled scripts
Type: unspecified value (read only)
Default:
{ }
Declared by:
perSystem.scripts.__exportableScripts
enabled scripts, with some config removed, suitable for importing between scripts
Type: unspecified value (read only)
Default:
{ }
Declared by:
perSystem.scripts.addToPackages
Whether to enable adds all scripts to packages depending on module type
- flake:
packages.{system} - nixos:
environment.systemPackages - home:
home.packages.
Type: boolean
Default:
true
Example:
true
Declared by:
perSystem.scripts.defaultLibDirs
optional script lib dir set for all nushell scripts
Type: null or absolute path
Default:
null
Declared by:
perSystem.scripts.defaultShell
set default shell for all scripts
Type: string
Default:
"nu"
Declared by:
perSystem.scripts.pkgs
Nixpkgs used to generate script. Influences shell runtime.
Type: Nixpkgs package set
Default:
pkgs
Declared by:
perSystem.scripts.scripts
Generate scripts from different shells from string snippets, files, or nushell modules.
Enabled scripts are added to packages.{system} by name if scripts.addToPackages is set.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
my-test-script.text = "ls -l";
my-test-script-bash-test.shell = "bash";
my-test-script-bash-test.text = "ls -la";
my-test-script-env-has.inputs = [pkgs.afetch];
my-test-script-env-has.text = ''
def main [ var ] {
print $"Env ($var) present: (envHas $var)"
afetch
}
'';
}
Declared by:
perSystem.scripts.scripts.<name>.enable
Whether to enable enable script, auto-matically adds script to packages.
Type: boolean
Default:
true
Example:
true
Declared by:
perSystem.scripts.scripts.<name>.package
package binary for running script
Type: package
Default:
""
Declared by:
perSystem.scripts.scripts.<name>.checkPhase
setting of writeShellApplication, if null runs a default bash one
Type: null or string
Default:
""
Declared by:
perSystem.scripts.scripts.<name>.env
runtime env to provide to script
Type: null or (attribute set of string)
Default:
null
Example:
{
ENV_VAR = "variable";
}
Declared by:
perSystem.scripts.scripts.<name>.extraConfig
extra config to add to `writeShellApplication
Type: attribute set of raw value
Default:
{ }
Example:
with pkgs; [
caddy
gnused
]
Declared by:
perSystem.scripts.scripts.<name>.file
optionally set script file path, recommended for script files which only contain a single main
Type: absolute path
Default:
builtins.toFile "‹name›.nu" config.text
Example:
./fill.nu
Declared by:
perSystem.scripts.scripts.<name>.inputs
runtime inputs to add to script
Type: list of package
Default:
[ ]
Example:
with pkgs; [
caddy
gnused
]
Declared by:
perSystem.scripts.scripts.<name>.name
script name, also used as name of binary
Type: string
Default:
"‹name›"
Declared by:
perSystem.scripts.scripts.<name>.nuLegacyModule
optional nu legacy module wrapper
Type: null or absolute path
Default:
null
Example:
./my-helpers.nu
Declared by:
perSystem.scripts.scripts.<name>.nuLibDirs
sets NU_LIB_DIRS in nushell scripts
Type: null or absolute path
Default:
null
Example:
./nu
Declared by:
perSystem.scripts.scripts.<name>.nuModule
optional nu module wrapper, very basic wrapper that exports a module to be called from cli
Type: null or absolute path
Default:
null
Example:
./my-helpers.nu
Declared by:
perSystem.scripts.scripts.<name>.runtimeShell
runtime shell package.
Type: package
Declared by:
perSystem.scripts.scripts.<name>.shell
runtime shell of script
Type: string
Default:
"nu"
Example:
"bash"
Declared by:
perSystem.scripts.scripts.<name>.text
nushell script
Type: string
Default:
""
Declared by:
perSystem.sites
generated docs packages
Type: attribute set of (submodule)
Default:
{ }
Declared by:
perSystem.sites.<name>.docgen
option docs generated from docs.sites.<site>.docgen
Type: attribute set of (submodule)
Default:
{ }
Declared by:
perSystem.sites.<name>.docgen.<name>.docsout
nixosOptionsDocs output
Type: lazy attribute set of raw value
Default:
{ }
Declared by:
perSystem.sites.<name>.docgen.<name>.filtered
filter optionsCommonMark output of {mkdocs}, removing file paths + fixing siteRoot links
Type: path in the Nix store
Declared by:
perSystem.sites.<name>.docgen.<name>.outName
output name, used for package names / prefix
Type: string
Default:
""
Declared by:
perSystem.sites.<name>.mdbook
mdbook build and some postprocessing
Type: path in the Nix store
Declared by:
perSystem.sites.<name>.mdbook-pre
mdbook with some preprocessing applied + docgen options copied in
Type: path in the Nix store
Declared by: