summary refs log tree commit diff
path: root/lib/tests/modules/attrsOf-conditional-check.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/modules/attrsOf-conditional-check.nix')
-rw-r--r--lib/tests/modules/attrsOf-conditional-check.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tests/modules/attrsOf-conditional-check.nix b/lib/tests/modules/attrsOf-conditional-check.nix
new file mode 100644
index 00000000000..0f00ebca155
--- /dev/null
+++ b/lib/tests/modules/attrsOf-conditional-check.nix
@@ -0,0 +1,7 @@
+{ lib, config, ... }: {
+  options.conditionalWorks = lib.mkOption {
+    default = ! config.value ? foo;
+  };
+
+  config.value.foo = lib.mkIf false "should not be defined";
+}