summaryrefslogtreecommitdiffstats
path: root/configs/initrd/sshd.nix
blob: 93c4ec9e4193287df8a83819402b4cedb304cc2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, ... }: {
  boot.initrd.availableKernelModules = [
    "e1000e"
  ];
  boot.initrd.network.enable = true;
  boot.initrd.network.ssh = {
    enable = true;
    port = 11423;
    authorizedKeys = [
      config.krebs.users.tv.pubkey
    ];
    ignoreEmptyHostKeys = true;
  };
  boot.initrd.secrets = {
    "/etc/ssh/ssh_host_rsa_key" = <secrets/initrd/ssh_host_rsa_key>;
  };

  boot.initrd.systemd.network.enable = config.boot.initrd.systemd.enable;
  boot.initrd.systemd.network.networks."10-dhcp" = {
    matchConfig.Name = [ "en*" ];
    DHCP = "yes";
  };
}