You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
926 B
32 lines
926 B
6 years ago
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
|
||
|
cfg = config.home-manager;
|
||
|
|
||
2 years ago
|
in {
|
||
|
imports = [ ../integration-common.nix ];
|
||
|
|
||
|
config = mkMerge [
|
||
|
{ home-manager.extraSpecialArgs.darwinConfig = config; }
|
||
|
(mkIf (cfg.users != { }) {
|
||
|
system.activationScripts.postActivation.text = concatStringsSep "\n"
|
||
|
(mapAttrsToList (username: usercfg: ''
|
||
|
echo Activating home-manager configuration for ${username}
|
||
|
sudo -u ${username} -s --set-home ${
|
||
|
pkgs.writeShellScript "activation-${username}" ''
|
||
|
${lib.optionalString (cfg.backupFileExtension != null)
|
||
|
"export HOME_MANAGER_BACKUP_EXT=${
|
||
|
lib.escapeShellArg cfg.backupFileExtension
|
||
|
}"}
|
||
|
${lib.optionalString cfg.verbose "export VERBOSE=1"}
|
||
|
exec ${usercfg.home.activationPackage}/activate
|
||
|
''
|
||
5 years ago
|
}
|
||
2 years ago
|
'') cfg.users);
|
||
|
})
|
||
|
];
|
||
6 years ago
|
}
|