nix-darwin: login as the user when activating

(cherry picked from commit 7ec153889c)
This commit is contained in:
Wael M. Nasreddine 2019-02-20 23:37:03 -08:00 committed by Robert Helgesson
parent 9b82a37d28
commit ec05213a41
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -42,7 +42,7 @@ in
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}
sudo -u ${username} ${usercfg.home.activationPackage}/activate sudo -u ${username} -i ${usercfg.home.activationPackage}/activate
'') cfg.users); '') cfg.users);
}; };
} }