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}.ricematches the current rice.nixos: sets its value toconfigifmoduleSystemisnixosandconfig.${myconfigName}.ricematches the current rice.home: sets its value toconfigifmoduleSystemishomeandconfig.${myconfigName}.ricematches the current rice. Otherwise, ifconfig.${myconfigName}.ricematches the current rice, sets its value toconfig.home-manager.users.${homeManagerUser}.darwin: sets its value toconfigifmoduleSystemisdarwinandconfig.${myconfigName}.ricematches the current rice.
Passed Arguments
A list of arguments passed to [myconfig|nixos|home|darwin] if their type is lambda:
name: the samenameas 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
# if moduleSystem == "nixos"
# then {config = ...;}
# else {}
# else {}
nixos = {name, cfg, myconfig, ...}: {};
# if config.${myconfigName}.rice == name, then
# if moduleSystem == "home"
# then {config = ...;}
# else {config.home-manager.users.${homeManagerUser} = ...;}
# else {}
home = {name, cfg, myconfig, ...}: {};
# if config.${myconfigName}.rice == name, then
# if moduleSystem == "darwin"
# then {config = ...;}
# else {}
# else {}
darwin = {name, cfg, myconfig, ...}: {};
}