1 { pkgs, lib, config, ... }:
3 networking.nftables.ruleset = ''
4 add rule inet filter net2fw tcp dport 10022 counter accept comment "SSH (reverse to losurdo)"
7 gatewayPorts = "clientspecified";
10 boot.initrd.network.ssh = {
12 # To prevent ssh from freaking out because a different host key is used,
13 # a different port for dropbear is useful
14 # (assuming the same host has also a normal sshd running)
16 authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
17 hostKeys = [ "/root/initrd/ssh.key" ];
19 boot.initrd.network = {
21 # This will automatically load the zfs password prompt on login
22 # and kill the other prompt so boot can continue
23 # The pkill zfs kills the zfs load-key from the console
24 # allowing the boot to continue.
26 echo >>/root/.profile "zfs load-key rpool && pkill zfs"