Open shymega opened 1 month ago
You could make home-manager
an alias for home-manager -b "<backup extension>"
; for example, I use -b "hm.bak"
.
Hello,
On 23.07.2024 14:59, Liassica wrote:
You could make
home-manager
an alias forhome-manager -b "<backup extension>"
; for example, I use-b "hm.bak"
.-- Reply to this email directly or view it on GitHub: https://github.com/nix-community/home-manager/issues/5649#issuecomment-2246385397 You are receiving this because you authored the thread.
Message ID: @.***>
Yes, I could. But that wouldn't be declarative. I would rather it be checked in with my Nix Flake.
I've had a look at the sources, but I am not sure where would be the best way to integrate this argument.
Dom Rodriguez GPG Fingerprint: EB0D 45E6 D0DC 1BA1 A2B5 FC24 72DC F123 1E54 BD43
If you use Home Manager to manage your shell, you can set aliases declaratively:
home.shellAliases.home-manager = "home-manager -b hm.bak";
This is true. However, I believe this should be implemented in the Nix hmModule
itself.
When I get around to moving my shell config to Home Manager, I'll keep your suggestion in mind.
Looking through the exposed homeManagerConfiguration
function via lib
, I think it would be possible to use backupFileExtension
, as an additional parameter.
I would like homeManagerConfiguration
to have this argument and do not think using shell aliases solves the issue.
Would the maintainers be open to a PR adding this functionality?
Thank you.
Description
I'm on NixOS 24.05 (plus HM 24.05), and I was wondering if it would be possible to allow the usage of
backupFileExtension
for Home Manager configurations usinglib.homeManagerConfiguration
. Currently, I can see the option is implemented when HM is used as a NixOS module, or anix-darwin
module.However, my config is based around the
lib.homeManagerConfiguration
module. I could embed it in the NixOS config, but on some systems, I can't install NixOS.I've done basic searches in the issue tracker, and AFAICT, but this hasn't been implemented yet.
Thoughts?