doc: added comments explaining teh function
This commit is contained in:
parent
8ef0e1e3d6
commit
c0691b8d8d
1 changed files with 10 additions and 1 deletions
11
flake.nix
11
flake.nix
|
@ -32,7 +32,16 @@
|
|||
# map applies this function to every item in an array
|
||||
create_nixosConfigurations = map (
|
||||
# converts it into {name_of_machiene = {system = '..'; modules = '..'}}
|
||||
config: {${config.name} = nixpkgs.lib.nixosSystem (nixpkgs.lib.attrsets.filterAttrs (n: v: n != "name") config); }
|
||||
config: {
|
||||
# need to extract teh name of the machiene
|
||||
${config.name} = (
|
||||
# nixpkgs.lib.nixosSystem is a fucntion that is used to turn a attribute set into the config for a machiene
|
||||
nixpkgs.lib.nixosSystem (
|
||||
# dont want to pass the field named 'name' into teh set
|
||||
nixpkgs.lib.attrsets.filterAttrs (n: v: n != "name") config
|
||||
)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
# this merges together an array of atributes
|
||||
|
|
Loading…
Reference in a new issue