-
-
Notifications
You must be signed in to change notification settings - Fork 67
Description
(I am a new user of nh
, so apologies if I'm overlooking something here.)
Like many people, I use a single flake to manage several NixOS/Home Manager/nix-darwin configurations. While iterating on my configuration today, I found myself running nh home switch $FLAKE -c user@host
repeatedly. Running nh home switch --help
helpfully revealed the NH_HOME_FLAKE
environmental variable, but since my hostname is automatically assigned and differs from that used in my homeConfigurations
attribute, I still had to specify -c user@host
repeatedly, as there doesn't appear to be a way to specify a default configuration. I would love to see something like NH_{HOME_CONFIGURATION,OS_HOSTNAME,DARWIN_HOSTNAME}
environmental variables to specify default values for cases where the automatic inference cannot be relied on.
While looking at the help pages, --specialisation
stood out to me as another option where specifying a value through an environmental variable might be analogously convenient.