update inventory implementation

This commit is contained in:
Johannes Kirschbauer
2024-06-21 16:45:38 +02:00
committed by hsjobeki
parent 3a9c56deb2
commit afca7ae0cc
13 changed files with 349 additions and 109 deletions

View File

@@ -0,0 +1,36 @@
{ lib, ... }:
let
# {
# roles = {
# client = {
# machines = [
# "camina_machine"
# "vi_machine"
# ];
# };
# server = {
# machines = [ "vyr_machine" ];
# };
# };
# }
instanceOptions = lib.types.submodule {
options.roles = lib.mkOption { type = lib.types.attrsOf machinesList; };
};
# {
# machines = [
# "camina_machine"
# "vi_machine"
# "vyr_machine"
# ];
# }
machinesList = lib.types.submodule {
options.machines = lib.mkOption { type = lib.types.listOf lib.types.str; };
};
in
{
# clan.inventory.${moduleName}.${instanceName} = { ... }
options.clan.inventory = lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf instanceOptions);
};
}