summary refs log tree commit diff
path: root/lib/tests/modules/freeform-unstr-dep-str.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/modules/freeform-unstr-dep-str.nix')
-rw-r--r--lib/tests/modules/freeform-unstr-dep-str.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tests/modules/freeform-unstr-dep-str.nix b/lib/tests/modules/freeform-unstr-dep-str.nix
new file mode 100644
index 00000000000..549d89afeca
--- /dev/null
+++ b/lib/tests/modules/freeform-unstr-dep-str.nix
@@ -0,0 +1,8 @@
+{ lib, config, ... }: {
+  options.value = lib.mkOption {
+    type = lib.types.nullOr lib.types.str;
+    default = null;
+  };
+
+  config.foo = lib.mkIf (config.value != null) config.value;
+}