1
0
Fork 0

hosts/zinc: move initrd stuff to seperate file

This commit is contained in:
clerie 2023-09-22 21:00:43 +02:00
parent ac40659050
commit c2b1697fb5
2 changed files with 29 additions and 23 deletions

View File

@ -4,6 +4,7 @@
imports =
[
./hardware-configuration.nix
./initrd.nix
];
# Use the systemd-boot EFI boot loader.
@ -18,29 +19,6 @@
};
};
boot.initrd.network.enable = true;
boot.initrd.network.ssh = {
enable = true;
port = 1022;
#shell = "/bin/cryptsetup-askpass";
authorizedKeys = config.users.users.clerie.openssh.authorizedKeys.keys;
hostKeys = [
"/var/src/secrets/initrd/ssh_host_ed25519_key"
];
};
boot.initrd.kernelModules = [
"igc" # integrated rj45 network interface
"cdc_ether" # 5G modem via usb
];
boot.kernelParams = [ "ip=dhcp" ];
boot.initrd.network.wireguard = {
enable = true;
ipv6s = [ "2a01:4f8:c0c:15f1::8110/128" ];
ipv4s = [ "10.20.30.110/32" ];
privateKeyFile = "/var/src/secrets/wireguard/wg-initrd";
};
networking.hostName = "zinc";
services.wg-clerie = {

28
hosts/zinc/initrd.nix Normal file
View File

@ -0,0 +1,28 @@
{ config, ... }:
{
boot.initrd.network.enable = true;
boot.initrd.network.ssh = {
enable = true;
port = 1022;
#shell = "/bin/cryptsetup-askpass";
authorizedKeys = config.users.users.clerie.openssh.authorizedKeys.keys;
hostKeys = [
"/var/src/secrets/initrd/ssh_host_ed25519_key"
];
};
boot.initrd.kernelModules = [
"igc" # integrated rj45 network interface
"cdc_ether" # external 5G modem via usb
];
boot.kernelParams = [ "ip=dhcp" ];
boot.initrd.network.wireguard = {
enable = true;
ipv6s = [ "2a01:4f8:c0c:15f1::8110/128" ];
ipv4s = [ "10.20.30.110/32" ];
privateKeyFile = "/var/src/secrets/wireguard/wg-initrd";
};
}