catalog: init

This commit is contained in:
Max Headroom 2024-07-05 22:48:39 +02:00
parent 62ec584812
commit 9bdaff208d
3 changed files with 42 additions and 0 deletions

10
catalog/part.nix Normal file
View file

@ -0,0 +1,10 @@
{ lib, ... }:
{
perSystem = {
options.catalog = lib.mkOption {
type = with lib.types; lazyAttrsOf (lazyAttrsOf (lazyAttrsOf (submodule ./target.nix)));
default = {};
};
};
}

31
catalog/target.nix Normal file
View file

@ -0,0 +1,31 @@
{ lib, name, ... }:
{
options = {
description = lib.mkOption {
type = lib.types.str;
default = name;
};
actions = lib.mkOption {
type = with lib.types; lazyAttrsOf (submodule {
options = {
description = lib.mkOption {
type = lib.types.str;
default = name;
};
command = lib.mkOption {
type = lib.types.str;
};
packages = lib.mkOption {
type = with lib.types; listOf package;
default = [];
};
};
});
default = {};
};
};
}

View file

@ -20,6 +20,7 @@
./jobs/part.nix
./lib/part.nix
./cluster/part.nix
./catalog/part.nix
];
};