From 817ca5e948a26c9dedae2f1e8e1bd24c6c1b9a9a Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Tue, 9 Sep 2025 23:03:10 +0200 Subject: [PATCH] types: add SCFGDirectives type This is currently broken, as it causes a overflow when generation documentation. --- modules/lib/types.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/modules/lib/types.nix b/modules/lib/types.nix index 523331729..a0b53c8fa 100644 --- a/modules/lib/types.nix +++ b/modules/lib/types.nix @@ -237,4 +237,41 @@ rec { ) defs ); }; + + SCFGDirectives = + let + inherit (types) + listOf + nullOr + submodule + ; + primType = + with types; + oneOf [ + int + float + str + bool + ]; + directive = + (submodule { + options = { + name = mkOption { type = types.str; }; + params = mkOption { + type = nullOr (listOf primType); + default = null; + }; + children = mkOption { + type = nullOr directives; + default = null; + }; + }; + }) + // { + description = "test"; + }; + directives = listOf directive; + in + # directives; + lib.types.anything; }