viperML / nh

Yet another nix cli helper
European Union Public License 1.2
888 stars 33 forks source link

`nh home switch flakepath/#user@host` is not a valid URL #157

Closed carschandler closed 2 hours ago

carschandler commented 3 hours ago

My MacBook reset its hostname in a new software update so I had to use the syntax

nh home switch .#chan@mbp where my flake hm configuration is defined like

      homeConfigurations = {
        "chan@mbp" = home-manager.lib.homeManagerConfiguration {
          ...

And I got this error:

nh home switch .#chan@mbp
error: '.#mbp#homeConfigurations' is not a valid URL
Error:
   0: Failed to parse nix-eval output:

Location:
   src/home.rs:204

But was able to build with home-manager switch --flake .chan@mbp as normal.

viperML commented 3 hours ago

try nh home switch -c chan@mbp . instead

carschandler commented 3 hours ago

Nooooooooooooo

Caught red-handed

Thanks. I may open a PR to suggest that option in the error message if that's cool.