update inventory implementation
This commit is contained in:
committed by
hsjobeki
parent
b4a8a3d047
commit
1b226c9e09
36
nixosModules/clanCore/inventory/interface.nix
Normal file
36
nixosModules/clanCore/inventory/interface.nix
Normal 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);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user