1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

nix-darwin: actually install packages

Also apply assertions when using the nix-darwin module.

Closes #702
This commit is contained in:
Roman Volosatovs 2019-05-03 16:11:13 +02:00 committed by Robert Helgesson
parent 02a07f19a1
commit 1480a6ca14
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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}