diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 3c827c3d6627..7fb5c2259062 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -181,9 +181,10 @@ let "machines.target" "systemd-machined.service" ] - ++ [ + ++ optionals cfg.package.withNspawn [ "systemd-nspawn@.service" - + ] + ++ [ # Misc. "systemd-sysctl.service" "systemd-machine-id-commit.service" diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index a0d654c1a4cd..071d67509065 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -898,6 +898,7 @@ stdenv.mkDerivation (finalAttrs: { withLocaled withMachined withNetworkd + withNspawn withPortabled withSysupdate withTimedated