nix-darwin: actually install packages
Also apply assertions when using the nix-darwin module. Closes #702
This commit is contained in:
parent
02a07f19a1
commit
1480a6ca14
|
@ -39,6 +39,22 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.users != {}) {
|
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 =
|
system.activationScripts.postActivation.text =
|
||||||
concatStringsSep "\n" (mapAttrsToList (username: usercfg: ''
|
concatStringsSep "\n" (mapAttrsToList (username: usercfg: ''
|
||||||
echo Activating home-manager configuration for ${username}
|
echo Activating home-manager configuration for ${username}
|
||||||
|
|
Loading…
Reference in a new issue