diff --git a/nixos/modules/services/networking/ifstate.nix b/nixos/modules/services/networking/ifstate.nix index ef4a132ea2ed..f7a8222fdaaa 100644 --- a/nixos/modules/services/networking/ifstate.nix +++ b/nixos/modules/services/networking/ifstate.nix @@ -176,6 +176,11 @@ in "network.target" ]; + unitConfig = { + # Avoid default dependencies like "basic.target", which prevents ifstate from starting before luks is unlocked. + DefaultDependencies = "no"; + }; + # mount is always available on nixos, avoid adding additional store paths to the closure path = [ "/run/wrappers" ]; @@ -291,6 +296,11 @@ in "network.target" ]; + unitConfig = { + # Avoid default dependencies like "basic.target", which prevents ifstate from starting before luks is unlocked. + DefaultDependencies = "no"; + }; + # mount is always available on nixos, avoid adding additional store paths to the closure # https://github.com/NixOS/nixpkgs/blob/2b8e2457ebe576ebf41ddfa8452b5b07a8d493ad/nixos/modules/system/boot/systemd/initrd.nix#L550-L551 path = [