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