diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-01 22:16:57 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-03 20:18:01 +0100 |
| commit | 5f683a4e264c64b838e6244cf72e9d08d84be26e (patch) | |
| tree | d8e9e21cf2ea8a374320d887381c67317f4f658b /user-profiles | |
| parent | 05bc32c1b78c983f11e63dbf01924262e7af42ca (diff) | |
| download | nixos-5f683a4e264c64b838e6244cf72e9d08d84be26e.tar nixos-5f683a4e264c64b838e6244cf72e9d08d84be26e.tar.gz nixos-5f683a4e264c64b838e6244cf72e9d08d84be26e.tar.bz2 nixos-5f683a4e264c64b838e6244cf72e9d08d84be26e.tar.xz nixos-5f683a4e264c64b838e6244cf72e9d08d84be26e.zip | |
implement user profiles
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 | } | ||
