diff --git a/nix/nixos-module/server/lxc-containers.nix b/nix/nixos-module/server/lxc-containers.nix index 1451d09..385c609 100644 --- a/nix/nixos-module/server/lxc-containers.nix +++ b/nix/nixos-module/server/lxc-containers.nix @@ -115,7 +115,8 @@ in systemd.services."lxc-rootfs@" = { description = "rootfs for '%i'"; - wants = [ "nix-daemon.service" ]; + requires = [ "nix-daemon.service" ]; + after = [ "network.target" ]; path = [ config.nix.package pkgs.util-linux pkgs.git ]; scriptArgs = "%i"; script = '' @@ -135,9 +136,8 @@ in systemd.services."lxc@" = { description = "LXC container '%i'"; - wants = [ "systemd-networkd.service" ]; requires = [ "lxc-rootfs@%i.service" ]; - after = [ "lxc-rootfs@%i.service" ]; + after = [ "network.target" ]; serviceConfig = { Type = "simple"; ExecStart =