diff options
Diffstat (limited to 'user-profiles')
| -rw-r--r-- | user-profiles/core.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/user-profiles/core.nix b/user-profiles/core.nix new file mode 100644 index 00000000..6f473b1a --- /dev/null +++ b/user-profiles/core.nix | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | { flake, userName, lib, customUtils, ... }: | ||
| 2 | let | ||
| 3 | userProfileSet = customUtils.types.attrNameSet (lib.zipAttrs (lib.attrValues flake.nixosModules.userProfiles)); | ||
| 4 | in { | ||
| 5 | options = { | ||
| 6 | users.users = lib.mkOption { | ||
| 7 | type = lib.types.attrsOf (lib.types.submodule { | ||
| 8 | options.profiles = lib.mkOption { | ||
| 9 | type = userProfileSet; | ||
| 10 | default = []; | ||
| 11 | description = '' | ||
| 12 | Set (list without duplicates) of ‘userProfiles’ enabled for this user | ||
| 13 | ''; | ||
| 14 | }; | ||
| 15 | }); | ||
| 16 | }; | ||
| 17 | }; | ||
| 18 | |||
| 19 | config = { | ||
| 20 | users.users.${userName} = {}; # Just make sure the user is created | ||
| 21 | |||
| 22 | home-manager.users.${userName} = { | ||
| 23 | manual.manpages.enable = true; | ||
| 24 | }; | ||
| 25 | }; | ||
| 26 | } | ||
