From 27e91508cc13c63c0383bff1b75e11365a5eb5b0 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 2 Jun 2026 16:28:28 +0000 Subject: [PATCH] fix(home-manager): back up clobbered dotfiles on activation 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. --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 2378dfb..fefc2b6 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; } ];