From b41442d517ccb663df0517f0ec558645e3799fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 19 Nov 2023 16:00:56 +0100 Subject: [PATCH] boot.initrd.systemd: also enable if initrd networkd is used --- nixos/common/default.nix | 1 - nixos/hardware/hetzner-online/default.nix | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/common/default.nix b/nixos/common/default.nix index 5d5fdab..261a48d 100644 --- a/nixos/common/default.nix +++ b/nixos/common/default.nix @@ -21,7 +21,6 @@ # - systems with raids as this currently require manual configuration (https://github.com/NixOS/nixpkgs/issues/210210) # - for containers we currently rely on the `stage-2` init script that sets up our /etc boot.initrd.systemd.enable = lib.mkDefault ( - !config.boot.initrd.network.enable && !(if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then config.boot.swraid.enable else diff --git a/nixos/hardware/hetzner-online/default.nix b/nixos/hardware/hetzner-online/default.nix index 6f72d11..1e91c77 100644 --- a/nixos/hardware/hetzner-online/default.nix +++ b/nixos/hardware/hetzner-online/default.nix @@ -38,5 +38,8 @@ networkConfig.Gateway = "fe80::1"; networkConfig.IPv6AcceptRA = "no"; }; + + # Network configuration i.e. when we unlock machines with openssh in the initrd + boot.initrd.systemd.network.networks."10-uplink" = config.systemd.network.networks."10-uplink"; }; }