summaryrefslogtreecommitdiff
path: root/user-profiles
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-01-01 22:16:57 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-01-01 22:16:57 +0100
commit0ded132804541286e827dfda599c7a5ff898e07b (patch)
tree8db298842b4d8d1ca80f73d6ba80082ebe642ec0 /user-profiles
parenta8c9742aae6f2672754c8c7f84694cf6a89d5a19 (diff)
downloadnixos-0ded132804541286e827dfda599c7a5ff898e07b.tar
nixos-0ded132804541286e827dfda599c7a5ff898e07b.tar.gz
nixos-0ded132804541286e827dfda599c7a5ff898e07b.tar.bz2
nixos-0ded132804541286e827dfda599c7a5ff898e07b.tar.xz
nixos-0ded132804541286e827dfda599c7a5ff898e07b.zip
implement user profiles
Diffstat (limited to 'user-profiles')
-rw-r--r--user-profiles/core.nix26
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, ... }:
2let
3 userProfileSet = customUtils.types.attrNameSet (lib.zipAttrs (lib.attrValues flake.nixosModules.userProfiles));
4in {
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}