mkHosts
Source: src/mkHosts.nix
Type: { inputs, src?, flakePath?, helpers?, modulesPath?, specialArgs?, sharedConfig? } -> { ... }
Arguments:
-
inputs:{ ... }Inputs of the flake. Must contain
selfandnixpkgs. -
(optional)
src:PathPath to the hosts directory. Defaults to
./hosts. -
(optional)
flakePath:StringFull path to the flake as string. Defaults to
null. -
(optional)
helpers:{ ... } | args: { ... }Additional functions to add to the library. Can be a function or a set of functions. If it is a function, it will be called with the arguments passed to each file to make functions be able to use configuration values. If it is just a set of functions, they will just be added to the
lib. Defaults to{}.Example:
helpers = args: { getUsername = "got ${args.username}"; }; -
(optional)
modulesPath:PathPath to the modules directory. Defaults to
null. If set, themkModulesfunction will be used to create the modules. -
(optional)
specialArgs:{ ... }Special arguments for all hosts. Defaults to
{}. These arguments will be passed to each file and can be overridden by theconfig.nixfile of each host. -
(optional)
sharedConfig:{ ... } | args: { ... }Shared configuration for all hosts (accepts args). Defaults to
{}. Can be a function or a set of functions. If it is a function, it will be called with the arguments passed to each file to make functions be able to use configuration values.