diff --git a/projects/default.nix b/projects/default.nix index ef59c71f8..435e1bd6d 100644 --- a/projects/default.nix +++ b/projects/default.nix @@ -36,11 +36,17 @@ let else assert elem name allowedFiles; { }; - allowedFiles = [ - "README.md" - "default.nix" - "models.nix" - ]; + allowedFiles = + [ + "README.md" + "default.nix" + "models.nix" + ] + # TODO: remove after fully migrating types to the module system + ++ [ + "default-module.nix" + "types.nix" + ]; in # TODO: use fileset and filter for `gitTracked` files concatMapAttrs names (readDir baseDirectory); diff --git a/projects/types.nix b/projects/types.nix new file mode 100644 index 000000000..a114fedc5 --- /dev/null +++ b/projects/types.nix @@ -0,0 +1,23 @@ +{ + lib, + ... +}: +let + inherit (lib) + types + mkOption + ; +in +{ + subgrant = + with types; + submodule { + options = lib.genAttrs [ "Commons" "Core" "Entrust" "Review" ] ( + name: + mkOption { + type = listOf str; + default = [ ]; + } + ); + }; +}