diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-02 16:21:34 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-02 16:21:34 +0100 |
commit | 8c946f2d3b36c8e34c1fba4df314f03b74d25a34 (patch) | |
tree | 30c6e81af8fbfc1473a3eeadf02542680437188e /system-profiles | |
parent | ee48cee0393d20c5d1121675288e041834a9285c (diff) | |
download | nixos-8c946f2d3b36c8e34c1fba4df314f03b74d25a34.tar nixos-8c946f2d3b36c8e34c1fba4df314f03b74d25a34.tar.gz nixos-8c946f2d3b36c8e34c1fba4df314f03b74d25a34.tar.bz2 nixos-8c946f2d3b36c8e34c1fba4df314f03b74d25a34.tar.xz nixos-8c946f2d3b36c8e34c1fba4df314f03b74d25a34.zip |
fix user-profiles
Diffstat (limited to 'system-profiles')
-rw-r--r-- | system-profiles/core.nix | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/system-profiles/core.nix b/system-profiles/core.nix index 79c2fe82..5f2433bb 100644 --- a/system-profiles/core.nix +++ b/system-profiles/core.nix | |||
@@ -1,6 +1,8 @@ | |||
1 | { flake, flakeInputs, path, hostName, config, lib, pkgs, customUtils, ... }: | 1 | { flake, flakeInputs, path, hostName, config, lib, pkgs, customUtils, ... }: |
2 | let | 2 | let |
3 | profileSet = customUtils.types.attrNameSet flake.nixosModules.systemProfiles; | 3 | profileSet = customUtils.types.attrNameSet flake.nixosModules.systemProfiles; |
4 | userProfileSet = customUtils.types.attrNameSet (lib.zipAttrs (lib.attrValues flake.nixosModules.userProfiles)); | ||
5 | hasSops = config.sops.secrets != {}; | ||
4 | in { | 6 | in { |
5 | imports = with flakeInputs; | 7 | imports = with flakeInputs; |
6 | [ sops-nix.nixosModules.sops | 8 | [ sops-nix.nixosModules.sops |
@@ -16,6 +18,18 @@ in { | |||
16 | Set (list without duplicates) of ‘systemProfiles’ enabled for this host | 18 | Set (list without duplicates) of ‘systemProfiles’ enabled for this host |
17 | ''; | 19 | ''; |
18 | }; | 20 | }; |
21 | |||
22 | users.users = lib.mkOption { | ||
23 | type = lib.types.attrsOf (lib.types.submodule { | ||
24 | options.profiles = lib.mkOption { | ||
25 | type = userProfileSet; | ||
26 | default = []; | ||
27 | description = '' | ||
28 | Set (list without duplicates) of ‘userProfiles’ enabled for this user | ||
29 | ''; | ||
30 | }; | ||
31 | }); | ||
32 | }; | ||
19 | }; | 33 | }; |
20 | 34 | ||
21 | config = { | 35 | config = { |
@@ -48,6 +62,11 @@ in { | |||
48 | 62 | ||
49 | # documentation.nixos.includeAllModules = true; # incompatible with home-manager (build fails) | 63 | # documentation.nixos.includeAllModules = true; # incompatible with home-manager (build fails) |
50 | 64 | ||
51 | home-manager.useGlobalPkgs = true; # Otherwise home-manager would only work impurely | 65 | home-manager = { |
66 | useGlobalPkgs = true; # Otherwise home-manager would only work impurely | ||
67 | useUserPackages = true; | ||
68 | }; | ||
69 | |||
70 | sops.gnupgHome = lib.mkIf hasSops "/root/.gnupg"; | ||
52 | }; | 71 | }; |
53 | } | 72 | } |