fix(home-manager): back up clobbered dotfiles on activation
CI / flake (pull_request) Successful in 1m52s
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:
@@ -79,6 +79,9 @@
|
|||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = 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.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = 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";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user