diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-08-01 23:02:29 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-08-01 23:02:29 +0200 |
commit | 5997986fd84b88dd619167b346af77ba5f5db80f (patch) | |
tree | 8e27ab5eaac0bbd5b6f84771e2e7034a898da0de /modules/core/tests.nix | |
parent | 1c9277a8faa010c180d280bf50dcf67be9815940 (diff) |
core/tests: Improve checks for container config
This reverts commit 3f0a9e8002802e5a772b7582f8254c92d7a2a4d5. It's now possible to disable support and tests for containers simply by using config.boot.enableContainers in the machine config, because that's the super option that enables all the container-related services and tools in upstream NixOS and it's also enabled by default. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/core/tests.nix')
-rw-r--r-- | modules/core/tests.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/core/tests.nix b/modules/core/tests.nix index 2e8b8c06..85a4340e 100644 --- a/modules/core/tests.nix +++ b/modules/core/tests.nix @@ -37,18 +37,21 @@ let { check = anyAttrs (i: i.hostBridge != null) config.containers; path = ["nixos" "containers-bridge"]; } - { check = config.networking.hostName != "brawndo"; # FIXME + { check = config.boot.enableContainers; path = ["nixos" "containers-imperative"]; } - { check = anyAttrs (i: i.hostAddress != null + { check = config.boot.enableContainers + && anyAttrs (i: i.hostAddress != null || i.localAddress != null) config.containers; path = ["nixos" "containers-ipv4"]; } - { check = anyAttrs (i: i.hostAddress6 != null + { check = config.boot.enableContainers + && anyAttrs (i: i.hostAddress6 != null || i.localAddress6 != null) config.containers; path = ["nixos" "containers-ipv6"]; } - { check = anyAttrs (i: i.extraVeths != {}) config.containers; + { check = config.boot.enableContainers + && anyAttrs (i: i.extraVeths != {}) config.containers; path = ["nixos" "containers-extra_veth"]; } { check = config.services.dnscrypt-proxy.enable; |