diff options
author | adisbladis <adisbladis@gmail.com> | 2022-08-10 23:24:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-10 23:24:14 +0800 |
commit | 053ab2f7a8bf698ccaad2f8b2b96ee9e093095fb (patch) | |
tree | 556ef3bced0f4457daa8afd7f6723f3e6458515d /nixos | |
parent | 4bd9ff729994f66894d696143357e4292f0ad8d9 (diff) | |
parent | 82c64d154b2743f34092bc1be519845c4496142d (diff) |
Merge pull request #185153 from puppe/enable-container-warning
nixos/nixos-containers: Fix ineffective warning
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/virtualisation/nixos-containers.nix | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix index 6b8c21336c6b3..a4cd41e45dcc5 100644 --- a/nixos/modules/virtualisation/nixos-containers.nix +++ b/nixos/modules/virtualisation/nixos-containers.nix @@ -742,12 +742,6 @@ in config = mkIf (config.boot.enableContainers) (let - warnings = flatten [ - (optional (config.virtualisation.containers.enable && versionOlder config.system.stateVersion "22.05") '' - Enabling both boot.enableContainers & virtualisation.containers on system.stateVersion < 22.05 is unsupported. - '') - ]; - unit = { description = "Container '%i'"; @@ -771,6 +765,11 @@ in serviceConfig = serviceDirectives dummyConfig; }; in { + warnings = + (optional (config.virtualisation.containers.enable && versionOlder config.system.stateVersion "22.05") '' + Enabling both boot.enableContainers & virtualisation.containers on system.stateVersion < 22.05 is unsupported. + ''); + systemd.targets.multi-user.wants = [ "machines.target" ]; systemd.services = listToAttrs (filter (x: x.value != null) ( |