mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
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
1 changed files with 16 additions and 0 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue