1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
Commit graph

8 commits

Author SHA1 Message Date
Christina O'Donnell
ce76393bb7
home-manager: add support for custom backup command (#6424) (#7153)
This adds a new backupCommand option to allow users to specify a
custom command to run on existing files during activation, as an
alternative to the existing backupFileExtension mechanism.

Adds backupCommand option to NixOS and nix-darwin modules.

Exports HOME_MANAGER_BACKUP_COMMAND environment variable when set.

Updates file activation logic to use the custom backup command if
provided, falling back to the existing backup extension logic.

Updates collision checking and user-facing instructions to
mention the new option.

This enables advanced backup workflows, such as moving files to
trash or archiving with custom tools, before managing them with
Home Manager.
2025-10-30 12:26:13 -05:00
fidgetingbits
c4aaddeaec home-manager: Document 'force = true' option in error output
Add a note about 'force = true' as an option for addressing collision
errors
2025-10-11 22:20:30 -05:00
saygo-png
004753ae6b home-manager: add backup overwrite option
When using the backupFileExtension option, if the backup file exists,
the activation process fails. This adds an option to instead overwrite
the old backup instead of failing.
2025-10-01 11:45:00 -05:00
x71c9
7500458e85 files: improve collision error message formatting for readability
Render each bullet as a single line at runtime while keeping ~80-column source formatting. Prevents truncation of the colliding path in service logs, reducing the need to inspect journal output.
2025-10-01 11:43:30 -05:00
Winter
96354906f5
files: show better error when file would be clobbered (#7348)
Before:

> Existing file '' would be clobbered by backing up '/home/winter/.config/fish/config.fish'

After:

> Existing file '/home/winter/.config/fish/config.fish' would be clobbered
2025-06-30 21:16:25 -05:00
Lin Xianyi
2468b2d355
files: show colliding files at bottom in checkLinkTargets (#5495)
Prevents the actual file collision errors from being
truncated in the systemd log
2025-05-20 21:11:16 -05:00
Lichthagel
f8e6694eda
files: make collision error message more helpful
Most importantly, also indicate how to use file backup for NixOS and
nix-darwin modules.
2024-04-30 00:41:45 +02:00
Smaug123
b787726a84
home-manager: extract inline shell script to file 2024-04-06 10:04:27 +02:00