diff --git a/modules/baremetal.nix b/modules/baremetal.nix index 77effeb3..27029025 100644 --- a/modules/baremetal.nix +++ b/modules/baremetal.nix @@ -4,6 +4,24 @@ options.c3d2.baremetal = lib.mkEnableOption "baremetal"; config = lib.mkIf config.c3d2.baremetal { + boot.initrd.network = { + enable = true; + ssh = { + enable = true; + authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys; + hostKeys = [ + "/etc/ssh/initrd/ssh_host_ed25519_key" + "/etc/ssh/initrd/ssh_host_rsa_key" + ]; + port = 4748; + }; + postCommands = '' + cat < /root/.profile + cryptsetup-askpass + EOF + ''; + }; + environment.systemPackages = with pkgs; [ lshw pciutils # lscpi