summary refs log tree commit diff
path: root/lib/tests/modules/declare-attrsOfSub-any-enable.nix
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2019-06-13 23:53:03 +0200
committerworldofpeace <worldofpeace@protonmail.ch>2020-01-06 10:39:19 -0500
commitcde46494c6960243bcb42aeda14f2a4212320bd6 (patch)
treed19c953da820a62b1cd057dc972b9671d266f907 /lib/tests/modules/declare-attrsOfSub-any-enable.nix
parent1d61efb7f177f7b70c467ab4940fde0a3481d4dc (diff)
downloadnixpkgs-cde46494c6960243bcb42aeda14f2a4212320bd6.tar
nixpkgs-cde46494c6960243bcb42aeda14f2a4212320bd6.tar.gz
nixpkgs-cde46494c6960243bcb42aeda14f2a4212320bd6.tar.bz2
nixpkgs-cde46494c6960243bcb42aeda14f2a4212320bd6.tar.lz
nixpkgs-cde46494c6960243bcb42aeda14f2a4212320bd6.tar.xz
nixpkgs-cde46494c6960243bcb42aeda14f2a4212320bd6.tar.zst
nixpkgs-cde46494c6960243bcb42aeda14f2a4212320bd6.zip
lib/tests: remove strictly loaOf tests and rebase on attrsOf
Diffstat (limited to 'lib/tests/modules/declare-attrsOfSub-any-enable.nix')
-rw-r--r--lib/tests/modules/declare-attrsOfSub-any-enable.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/tests/modules/declare-attrsOfSub-any-enable.nix b/lib/tests/modules/declare-attrsOfSub-any-enable.nix
new file mode 100644
index 00000000000..986d07227e1
--- /dev/null
+++ b/lib/tests/modules/declare-attrsOfSub-any-enable.nix
@@ -0,0 +1,29 @@
+{ lib, ... }:
+
+let
+  submod = { ... }: {
+    options = {
+      enable = lib.mkOption {
+        default = false;
+        example = true;
+        type = lib.types.bool;
+        description = ''
+          Some descriptive text
+        '';
+      };
+    };
+  };
+in
+
+{
+  options = {
+    attrsOfSub = lib.mkOption {
+      default = {};
+      example = {};
+      type = lib.types.attrsOf (lib.types.submodule [ submod ]);
+      description = ''
+        Some descriptive text
+      '';
+    };
+  };
+}