mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
nix-darwin: use launchctl asuser now that activation runs as root (#7051)
https://github.com/nix-darwin/nix-darwin/pull/1341#discussion_r1989887502
This commit is contained in:
@@ -19,7 +19,7 @@ in
|
||||
system.activationScripts.postActivation.text = lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (username: usercfg: ''
|
||||
echo Activating home-manager configuration for ${usercfg.home.username}
|
||||
sudo -u ${usercfg.home.username} --set-home ${pkgs.writeShellScript "activation-${usercfg.home.username}" ''
|
||||
launchctl asuser "$(id -u ${usercfg.home.username})" sudo -u ${usercfg.home.username} --set-home ${pkgs.writeShellScript "activation-${usercfg.home.username}" ''
|
||||
${lib.optionalString (
|
||||
cfg.backupFileExtension != null
|
||||
) "export HOME_MANAGER_BACKUP_EXT=${lib.escapeShellArg cfg.backupFileExtension}"}
|
||||
|
||||
Reference in New Issue
Block a user