Structure
Function Arguments
name
: a string representing the rice name.inherits
: a list of strings - the names of rices whose configurations will be inherited by the current rice.inheritanceOnly
: a boolean value that determines whether this rice will be added to the list of systems generated for each host and rice, or if it is only used for inheritance.myconfig
: sets its value toconfig.${myconfigName}
ifconfig.${myconfigName}.rice
matches the current rice.nixos
: sets its value toconfig
ifisHomeManager
isfalse
andconfig.${myconfigName}.rice
matches the current rice.home
: sets its value toconfig
ifisHomeManager
istrue
andconfig.${myconfigName}.rice
matches the current rice. Otherwise, ifconfig.${myconfigName}.rice
matches the current rice, sets its value toconfig.home-manager.users.${homeManagerUser}
.
Passed Arguments
A list of arguments passed to [myconfig|nixos|home]
if their type is lambda
:
name
: the samename
as in the arguments ofdelib.rice
.myconfig
: equalsconfig.${myConfigName}
.cfg
: equalsconfig.${myConfigName}.rices.${delib.rice :: name}
.
Pseudocode
nix
delib.rice {
name = "";
inherits = [];
inheritanceOnly = [];
# if config.${myconfigName}.rice == name
# then {config.${myConfigName} = ...;}
# else {}
myconfig = {name, cfg, myconfig, ...}: {};
# if config.${myconfigName}.rice == name
# then {config = ...;}
# else {}
nixos = {name, cfg, myconfig, ...}: {};
# if config.${myconfigName}.rice == name, then
# if isHomeManager
# then {config = ...;}
# else {config.home-manager.users.${homeManagerUser} = ...;}
# else {}
home = {name, cfg, myconfig, ...}: {};
}