diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index 8e3180299..284d2d60c 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}