ZFS: Difference between revisions

imported>Sjau
Undo revision 1080 by Sjau (talk)
imported>Mic92
inline ssh key
Line 248: Line 248:
         # $ nix-shell -p dropbear --command "dropbearkey -t ecdsa -f /tmp/initrd-ssh-key"
         # $ nix-shell -p dropbear --command "dropbearkey -t ecdsa -f /tmp/initrd-ssh-key"
         hostECDSAKey = "/run/keys/initrd-ssh-key";
         hostECDSAKey = "/run/keys/initrd-ssh-key";
        # public ssh key used for login
        authorizedKeys = [ "ssh-rsa AAAA..." ];
     };
     };
     # this will automatically load the zfs password prompt on login
     # this will automatically load the zfs password prompt on login
Line 259: Line 261:
* In order to use DHCP in the initrd, network manager must not be enabled and <code>networking.useDHCP = true;</code> must be set.
* In order to use DHCP in the initrd, network manager must not be enabled and <code>networking.useDHCP = true;</code> must be set.
* If your network card isn't started, you'll need to add the according kernel module to the initrd as well, e.g. <code>boot.initrd.kernelModules = [ "r8169" ];</code>
* If your network card isn't started, you'll need to add the according kernel module to the initrd as well, e.g. <code>boot.initrd.kernelModules = [ "r8169" ];</code>
* Also the initrd must contain at least one authroized key. A simple way to use root's authroized_keys file is the following piece in the ssh part:
<syntaxHighlight lang=nix>
        authorizedKeys = [
          ''
            ${builtins.readFile /root/.ssh/authorized_keys}
          ''
        ];
</syntaxHighlight>


== Need more info? ==
== Need more info? ==