I have this setting in my configuration:
users.users.crinklywrappr = {
openssh.authorizedKeys.keyFiles = [ /home/crinklywrappr/.ssh/id_rsa.pub ];
};
This works fine unless I’m re-installing the system from my thumbdrive. When I do that, nixos-install
says the path doesn’t exist. That makes sense, b/c /home
is mounted under /mnt
. So the correct path during reinstallation is /mnt/home/crinklywrappr/.ssh/id_rsa.pub
.
[root@nixos:/home/nixos]# nixos-install
copying channel...
building the configuration in /mnt/etc/nixos/configuration.nix...
error: opening file '/home/crinklywrappr/.ssh/id_rsa.pub': No such file or directory
(use '--show-trace' to show detailed location information)
I wonder if there is a way to specify the directory so it will work during normal rebuild w/ nixos-rebuild
, and reinstallation w/ nixos-install
?