aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nix-darwin/default.nix16
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}