nix-community/nixos-anywhere

"sshKeyDir: unbound variable"

Closed this issue ยท 3 comments

I have a virtual machine booted with the NixOS installer disk that I can ssh onto with a password:

ssh nixos@192.168.122.10

When I tried to use nixos-anywhere on this machine, I got

$ nix run github:nix-community/nixos-anywhere -- --flake .#minimal nixos@192.168.122.10
/nix/store/ldyzfbz61mxi18xlkdgkp4yqvww312lw-nixos-anywhere-1.3.0/libexec/nixos-anywhere/nixos-anywhere.sh: line 269: sshKeyDir: unbound variable

Is there any way to fix this? My configuration is the same as the one in here https://github.com/nix-community/nixos-anywhere-examples/tree/main with some names changed

Temporary workaround:

$ mkdir /tmp/sshKeyDir
$ sshKeyDir=/tmp/sshKeyDir nix run ...

there have been some recent overhauls to the code that need to be ironed out.

suggest to use the version before updates like this:

nix run github:nix-community/nixos-anywhere/69ad3f4a50cfb711048f54013404762c9a8e201e -- ...

I have the same bug, got it working up to bc77bd1

See more discussion in #371