aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/disable-module-with-toString-key.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modules/disable-module-with-toString-key.nix')
-rw-r--r--tests/modules/disable-module-with-toString-key.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/modules/disable-module-with-toString-key.nix b/tests/modules/disable-module-with-toString-key.nix
new file mode 100644
index 000000000..3f8c81904
--- /dev/null
+++ b/tests/modules/disable-module-with-toString-key.nix
@@ -0,0 +1,34 @@
+{ lib, ... }:
+let
+ inherit (lib) mkOption types;
+
+ moduleWithKey = {
+ key = 123;
+ config = {
+ enable = true;
+ };
+ };
+in
+{
+ options = {
+ positive = mkOption {
+ type = types.submodule {
+ imports = [
+ ./declare-enable.nix
+ moduleWithKey
+ ];
+ };
+ default = {};
+ };
+ negative = mkOption {
+ type = types.submodule {
+ imports = [
+ ./declare-enable.nix
+ moduleWithKey
+ ];
+ disabledModules = [ 123 ];
+ };
+ default = {};
+ };
+ };
+}