From 0ded132804541286e827dfda599c7a5ff898e07b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 1 Jan 2021 22:16:57 +0100 Subject: implement user profiles --- user-profiles/core.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 user-profiles/core.nix (limited to 'user-profiles') 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 @@ +{ flake, userName, lib, customUtils, ... }: +let + userProfileSet = customUtils.types.attrNameSet (lib.zipAttrs (lib.attrValues flake.nixosModules.userProfiles)); +in { + options = { + users.users = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule { + options.profiles = lib.mkOption { + type = userProfileSet; + default = []; + description = '' + Set (list without duplicates) of ‘userProfiles’ enabled for this user + ''; + }; + }); + }; + }; + + config = { + users.users.${userName} = {}; # Just make sure the user is created + + home-manager.users.${userName} = { + manual.manpages.enable = true; + }; + }; +} -- cgit v1.2.3