Fediversity/deployment/fediversity/resources/nixos-module/default.nix
Kiara Grouwstra c296bdab0a
deploy separate operator applications thru data model
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-11-22 17:55:10 +01:00

29 lines
708 B
Nix

{ lib, ... }:
let
inherit (lib) mkOption types;
in
{
resources.nixos-module = {
description = "A NixOS configuration module to include as-is.";
request =
{ ... }:
{
_class = "fediversity-resource-request";
options = {
module = mkOption {
description = "The NixOS configuration module to include.";
type = types.unspecified; # NixOS module
};
};
};
policy =
{ ... }:
{
_class = "fediversity-resource-policy";
config = {
resource-type = types.listOf types.unspecified; # NixOS module
apply = lib.lists.map (request: request.module);
};
};
};
}