Skip to content

Commit

Permalink
nix: enable ssh on initrd
Browse files Browse the repository at this point in the history
  • Loading branch information
benmezger committed Jan 26, 2025
1 parent d46bcaa commit b34b54a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hosts/default/bootloader.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
config,
lib,
pkgs,
userConf,
...
}:

Expand All @@ -14,6 +15,7 @@
# to prevent connection drop
# fixes: usb 1-10.2: 3:1: cannot get freq at ep 0x3
"usbhid.quirks=0x1532:0x00ab:0x00000400"
"ip=192.168.0.168::192.168.0.1:255.255.255.0:${userConf.hostname}.local::none"
];
supportedFilesystems = [ "btrfs" ];
kernelModules = [
Expand All @@ -27,6 +29,16 @@
};
};
initrd = {
systemd.users.root.shell = "/bin/cryptsetup-askpass";
network = {
enable = true;
ssh = {
enable = true;
port = 22;
authorizedKeys = userConf.sshKeys;
hostKeys = [ "/etc/secrets/initrd/host_rsa_key" ];
};
};
availableKernelModules = [
"vmd"
"xhci_pci"
Expand All @@ -35,6 +47,7 @@
"usbhid"
"usb_storage"
"sd_mod"
"igc"
];
luks.devices = {
cryptroot = {
Expand Down

0 comments on commit b34b54a

Please sign in to comment.