Inventory: init module merge & validation logic for inventory
This commit is contained in:
committed by
hsjobeki
parent
eb221244e6
commit
0d4928ab73
@@ -3,76 +3,25 @@ let
|
||||
clan-core = self;
|
||||
in
|
||||
{
|
||||
# Extension of the build clan interface
|
||||
# new_clan = clan-core.lib.buildClan {
|
||||
# # High level services.
|
||||
# # If you need multiple instances of a service configure them via:
|
||||
# # inventory.services.[serviceName].[instanceName] = ...
|
||||
# services = {
|
||||
# borbackup = {
|
||||
# roles.server.machines = [ "vyr" ];
|
||||
# roles.client.tags = [ "laptop" ];
|
||||
# machines.vyr = {
|
||||
# config = {
|
||||
|
||||
# };
|
||||
# };
|
||||
# config = {
|
||||
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Low level inventory i.e. if you need multiple instances of a service
|
||||
# # Or if you want to manipulate the created inventory directly.
|
||||
# inventory.services.borbackup.default = { };
|
||||
|
||||
# # Machines. each machine can be referenced by its attribute name under services.
|
||||
# machines = {
|
||||
# camina = {
|
||||
# # This is added to machine tags
|
||||
# clan.tags = [ "laptop" ];
|
||||
# # These are the inventory machine fields
|
||||
# clan.meta.description = "";
|
||||
# clan.meta.name = "";
|
||||
# clan.meta.icon = "";
|
||||
# # Config ...
|
||||
# };
|
||||
# vyr = {
|
||||
# # Config ...
|
||||
# };
|
||||
# vi = {
|
||||
# clan.networking.targetHost = "root@78.47.164.46";
|
||||
# # Config ...
|
||||
# };
|
||||
# aya = {
|
||||
# clan.networking.targetHost = "root@78.47.164.46";
|
||||
# # Config ...
|
||||
# };
|
||||
# ezra = {
|
||||
# # Config ...
|
||||
# };
|
||||
# rianon = {
|
||||
# # Config ...
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
clan = clan-core.lib.buildClan {
|
||||
meta.name = "sams's clans";
|
||||
|
||||
meta.name = "kenjis clan";
|
||||
# Should usually point to the directory of flake.nix
|
||||
directory = self;
|
||||
|
||||
# services = {
|
||||
# borgbackup = {
|
||||
# roles.server.machines = [ "vyr_machine" ];
|
||||
# roles.client.tags = [ "laptop" ];
|
||||
# };
|
||||
# };
|
||||
# service config
|
||||
# Useful alias: "inventory.services.borgbackup.default"
|
||||
services = {
|
||||
borgbackup = {
|
||||
roles.server.machines = [ "vyr_machine" ];
|
||||
roles.client.tags = [ "laptop" ];
|
||||
};
|
||||
};
|
||||
|
||||
# OR
|
||||
# merged with
|
||||
inventory = builtins.fromJSON (builtins.readFile ./src/tests/borgbackup.json);
|
||||
|
||||
# merged with
|
||||
machines = {
|
||||
"vyr_machine" = { };
|
||||
"vi_machine" = {
|
||||
|
||||
Reference in New Issue
Block a user