about summary refs log tree commit diff
path: root/hosts/common/system/boot-ssh.nix
blob: 2b865d50ef8cf75f554c343f1afb226e37a32505 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ config, lib, pkgs, ... }:

{
  boot.initrd = {
    network = {
      enable = true;
      postCommands = ''
        echo "cryptsetup-askpass; exit" > /root/.profile
      '';
      ssh = {
        enable = true;
        port = 2222;
        hostKeys = [
          /etc/ssh/ssh_host_ed25519_key
          /etc/ssh/ssh_host_rsa_key
        ];
        authorizedKeys = config.users.users.fcuny.openssh.authorizedKeys.keys;
      };
    };
  };
}