diff --git a/doc/mkFlakeOptions.md b/doc/mkFlakeOptions.md index c9f7088f1..529d0027e 100644 --- a/doc/mkFlakeOptions.md +++ b/doc/mkFlakeOptions.md @@ -1,7 +1,8 @@ ## extern -Function with argument 'inputs' with all devos and this flake's inputs. +Function with argument 'inputs' that contains all devos and ${self}'s inputs. The function should return an attribute set with modules, overlays, and -specialArgs to be included across devos +specialArgs to be included across nixos and home manager configurations. +Only attributes that are used should be returned. *_Type_*: @@ -9,12 +10,14 @@ function that evaluates to a(n) attrs *_Default_* ``` -"${self}/extern" +"{ modules = []; overlays = []; specialArgs = []; userModules = []; userSpecialArgs = []; }\n" ``` ## hosts -Path to directory containing host configurations +Path to directory containing host configurations that will be exported +to the 'nixosConfigurations' output. + *_Type_*: path @@ -26,19 +29,22 @@ path ## modules -list of modules to include in confgurations +list of modules to include in confgurations and export in 'nixosModules' output + *_Type_*: -list of anythings +list of valid modules *_Default_* ``` -"${self}/modules/module-list.nix" +[] ``` ## overlays -path to folder containing overlays which will be applied to pkgs +path to folder containing overlays which will be applied to pkgs and exported in +the 'overlays' output + *_Type_*: path @@ -57,7 +63,7 @@ attribute set *_Default_* ``` -"${self}/overrides" +"{ modules = []; disabledModules = []; packages = {}; }" ``` @@ -65,6 +71,7 @@ attribute set Overlay for custom packages that will be included in treewide 'pkgs'. This should follow the standard nixpkgs overlay format - two argument function that returns an attrset. +These packages will be exported to the 'packages' and 'legacyPackages' outputs. *_Type_*: @@ -72,12 +79,12 @@ Nixpkgs overlay *_Default_* ``` -"${self}/pkgs" +"(final: prev: {})" ``` ## profiles -path to profiles folder +path to profiles folder that can be collected into suites *_Type_*: path @@ -97,8 +104,10 @@ attribute set ## suites -function with inputs 'users' and 'profiles' that returns attribute 'system' -which defines suites passed to configurations as the suites specialArg +Function with inputs 'users' and 'profiles' that returns attribute set +with user and system suites. The former for Home Manager and the latter +for nixos configurations. +These can be accessed through the 'suites' specialArg in each config system. *_Type_*: @@ -106,24 +115,26 @@ function that evaluates to a(n) attrs *_Default_* ``` -"${self}/suites" +"{ user = {}; system = {}; }" ``` ## userModules -list of modules to include in home-manager configurations +list of modules to include in home-manager configurations and export in +'homeModules' output + *_Type_*: -list of anythings +list of valid modules *_Default_* ``` -"${self}/users/modules/module-list.nix" +[] ``` ## userProfiles -path to user profiles folder +path to user profiles folder that can be collected into userSuites *_Type_*: path @@ -135,7 +146,8 @@ path ## users -path to folder containing user profiles +path to folder containing profiles that define system users + *_Type_*: path diff --git a/lib/mkFlake/evalArgs.nix b/lib/mkFlake/evalArgs.nix index 324ca0a1b..69cc665cc 100644 --- a/lib/mkFlake/evalArgs.nix +++ b/lib/mkFlake/evalArgs.nix @@ -115,10 +115,7 @@ let type = inputAttrs; default = { ... }: defaults; defaultText = '' - { inputs }: { - modules = []; overlays = []; specialArgs = []; - userModules = []; userSpecialArgs = []; - } + { modules = []; overlays = []; specialArgs = []; userModules = []; userSpecialArgs = []; } ''; # So unneeded extern attributes can safely be deleted apply = x: defaults // (x { inputs = inputs // self.inputs; });