1 { config, hostName, ... }:
3 networking.nftables.ruleset = ''
6 tcp dport 10022 counter accept comment "SSH (reverse to losurdo)"
13 settings.GatewayPorts = "clientspecified";
15 systemd.services.sshd.serviceConfig.LoadCredentialEncrypted = [
16 "host.key:${ssh/host.key.cred}"
19 security.initrd.secrets."${hostName}/ssh/initrd.key" =
20 "hosts/${hostName}/ssh/initrd.key.gpg";
21 boot.initrd.network.ssh = {
24 authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
25 hostKeys = [ "${config.security.initrd.stage1Dir}/${hostName}/ssh/initrd.key" ];
27 boot.initrd.network = {
29 # This will automatically load the zfs password prompt on login
30 # and kill the other prompt so boot can continue
31 # The pkill zfs kills the zfs load-key from the console
32 # allowing the boot to continue.
34 echo >>/root/.profile "zfs load-key rpool && pkill zfs"