From c2b1697fb5d95e94241be1b21c0d0f051dcd33be Mon Sep 17 00:00:00 2001 From: clerie Date: Fri, 22 Sep 2023 21:00:43 +0200 Subject: [PATCH] hosts/zinc: move initrd stuff to seperate file --- hosts/zinc/configuration.nix | 24 +----------------------- hosts/zinc/initrd.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 hosts/zinc/initrd.nix diff --git a/hosts/zinc/configuration.nix b/hosts/zinc/configuration.nix index de63477..385d246 100644 --- a/hosts/zinc/configuration.nix +++ b/hosts/zinc/configuration.nix @@ -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 = { diff --git a/hosts/zinc/initrd.nix b/hosts/zinc/initrd.nix new file mode 100644 index 0000000..fa69543 --- /dev/null +++ b/hosts/zinc/initrd.nix @@ -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"; + }; + +}