diff options
author | Roman Volosatovs <rvolosatovs@riseup.net> | 2019-05-03 16:11:13 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2019-05-19 00:36:35 +0200 |
commit | 1480a6ca1429468016d61165c33d49866743981b (patch) | |
tree | c740f33f922855f473bae9c7e7bdfb0ee06de84e | |
parent | 02a07f19a14920597732647932bf5963ed2f1de8 (diff) |
nix-darwin: actually install packages
Also apply assertions when using the nix-darwin module.
Closes #702
-rw-r--r-- | nix-darwin/default.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index 8e318029938..284d2d60c03 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -39,6 +39,22 @@ in }; config = mkIf (cfg.users != {}) { + assertions = + flatten (flip mapAttrsToList cfg.users (user: config: + flip map config.assertions (assertion: + { + inherit (assertion) assertion; + message = "${user} profile: ${assertion.message}"; + } + ) + )); + + users.users = mkIf cfg.useUserPackages ( + mapAttrs (username: usercfg: { + packages = usercfg.home.packages; + }) cfg.users + ); + system.activationScripts.postActivation.text = concatStringsSep "\n" (mapAttrsToList (username: usercfg: '' echo Activating home-manager configuration for ${username} |