diff --git a/nixosModules/clanCore/vars/default.nix b/nixosModules/clanCore/vars/default.nix index 42532b284..35d8f775c 100644 --- a/nixosModules/clanCore/vars/default.nix +++ b/nixosModules/clanCore/vars/default.nix @@ -26,6 +26,7 @@ in ++ lib.optionals (_class == "nixos") [ ./secret/password-store.nix ]; + options.clan.core.vars = lib.mkOption { description = '' Generated Variables @@ -36,7 +37,14 @@ in - generate secrets like private keys automatically when they are needed - output multiple values like private and public keys simultaneously ''; - type = submodule { imports = [ ./interface.nix ]; }; + type = submodule { + imports = [ + ./interface.nix + { + settings.dependenciesType = lib.types.listOf lib.types.str; + } + ]; + }; }; config = { diff --git a/nixosModules/clanCore/vars/interface.nix b/nixosModules/clanCore/vars/interface.nix index 87506be6b..3ca9aa4aa 100644 --- a/nixosModules/clanCore/vars/interface.nix +++ b/nixosModules/clanCore/vars/interface.nix @@ -68,7 +68,6 @@ in default = generator.config._module.args.name; defaultText = "Name of the generator"; }; - dependencies = mkOption { description = '' A list of other generators that this generator depends on. @@ -78,7 +77,7 @@ in **A file `file1` of a generator named `dep1` will be available via `$in/dep1/file1`** ''; - type = listOf str; + type = config.settings.dependenciesType; default = [ ]; }; migrateFact = mkOption { diff --git a/nixosModules/clanCore/vars/settings-opts.nix b/nixosModules/clanCore/vars/settings-opts.nix index 226888111..47f5a31e7 100644 --- a/nixosModules/clanCore/vars/settings-opts.nix +++ b/nixosModules/clanCore/vars/settings-opts.nix @@ -65,4 +65,14 @@ Set it to pkgs.pass for GPG or pkgs.passage for age encryption. ''; }; + + dependenciesType = lib.mkOption { + type = lib.types.raw; + description = '' + The type of the `dependencies` option. + ''; + internal = true; + readOnly = true; + visible = false; + }; }