Skip to content

Commit c630dfa

Browse files
authored
nix-darwin: respect username setting of home-manager in activation script (#5881)
1 parent 7fd6dc2 commit c630dfa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nix-darwin/default.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ in {
1212
(lib.mkIf (cfg.users != { }) {
1313
system.activationScripts.postActivation.text = lib.concatStringsSep "\n"
1414
(lib.mapAttrsToList (username: usercfg: ''
15-
echo Activating home-manager configuration for ${username}
16-
sudo -u ${username} --set-home ${
17-
pkgs.writeShellScript "activation-${username}" ''
15+
echo Activating home-manager configuration for ${usercfg.home.username}
16+
sudo -u ${usercfg.home.username} --set-home ${
17+
pkgs.writeShellScript "activation-${usercfg.home.username}" ''
1818
${lib.optionalString (cfg.backupFileExtension != null)
1919
"export HOME_MANAGER_BACKUP_EXT=${
2020
lib.escapeShellArg cfg.backupFileExtension

0 commit comments

Comments
 (0)