mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
nixos/nixos-containers: Fix ineffective warning
A warning regarding enabling NixOS containers and
virtualisation.containers at the same time with state versions < 22.05
had been added in commit 3c49151f15
. But
this warning had accidentally been defined in the wrong place, and the
warning has therefore not actually been in effect. This commit fixes
that.
This commit is contained in:
parent
fb689e4916
commit
82c64d154b
1 changed files with 5 additions and 6 deletions
|
@ -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) (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue