From 756ba4a04184e68f09bdff9bd4767e6ddbd77adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pacana?= Date: Mon, 27 Jul 2026 10:14:37 +0200 Subject: [PATCH] Back up clobbered files when activating your own home too * The sudo -u branch already exported HOME_MANAGER_BACKUP_EXT=hm-bak; the invoking user's own activation didn't, so checkLinkTargets aborted switch on any file HM starts managing (fish functions moving from a directory symlink to per-file links hit this). --- lib/apps.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apps.nix b/lib/apps.nix index a23c9db..b812b3d 100644 --- a/lib/apps.nix +++ b/lib/apps.nix @@ -34,7 +34,7 @@ let accountScript = hostName: accountName: '' nix build ${self}#homeConfigurations."${hostName}-${accountName}".activationPackage if [ "$WHOAMI" = "${accountName}" ]; then - ./result/activate + HOME_MANAGER_BACKUP_EXT=hm-bak ./result/activate else HOME_MANAGER_BACKUP_EXT=hm-bak sudo -u ${accountName} -H ./result/activate fi -- 2.54.0