summary refs log tree commit diff
path: root/lib/tests/modules/declare-bare-submodule-nested-option.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/modules/declare-bare-submodule-nested-option.nix')
-rw-r--r--lib/tests/modules/declare-bare-submodule-nested-option.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tests/modules/declare-bare-submodule-nested-option.nix b/lib/tests/modules/declare-bare-submodule-nested-option.nix
new file mode 100644
index 00000000000..da125c84b25
--- /dev/null
+++ b/lib/tests/modules/declare-bare-submodule-nested-option.nix
@@ -0,0 +1,19 @@
+{ config, lib, ... }:
+let
+  inherit (lib) mkOption types;
+in
+{
+  options.bare-submodule = mkOption {
+    type = types.submoduleWith {
+      shorthandOnlyDefinesConfig = config.shorthandOnlyDefinesConfig;
+      modules = [
+        {
+          options.nested = mkOption {
+            type = types.int;
+            default = 1;
+          };
+        }
+      ];
+    };
+  };
+}