fix(home-manager): back up clobbered dotfiles on activation
CI / flake (pull_request) Successful in 1m52s

Set home-manager.backupFileExtension = "backup" on the NixOS and Darwin base modules. Existing machines carry hand-written ~/.zshrc and ~/.zshenv that home-manager would refuse to overwrite, aborting activation. With a backup extension, the originals are saved as .backup and activation proceeds. The oh-my-zsh setup is already declared in lyrathorpe/home/shell.nix, so the generated files supersede the old ones.
This commit is contained in:
Emma Thorpe
2026-06-02 16:28:28 +00:00
parent c339b42b45
commit 27e91508cc
+6
View File
@@ -79,6 +79,9 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Back up pre-existing dotfiles (e.g. .zshrc) instead of aborting
# activation when home-manager would overwrite them.
home-manager.backupFileExtension = "backup";
}
];
@@ -117,6 +120,9 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Back up pre-existing dotfiles (e.g. .zshrc) instead of aborting
# activation when home-manager would overwrite them.
home-manager.backupFileExtension = "backup";
}
];