about summary refs log tree commit diff
path: root/hosts/tahoe/boot.nix
blob: 89bd67238eb6f727a892ae156b7da037a7377ec2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ config, ... }:

{
  boot = {
    kernelParams = [
      # get an IP address on boot, so we can unlock the root disk remotely
      "ip=dhcp"
      # rotate the screen 90 degree counter clockwise
      "fbcon=rotate:1"
    ];
    initrd = {
      # driver for the NIC, required in order to get an IP address
      kernelModules = [ "r8169" ];
      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;
        };
      };
    };
  };
}