2024-06-20 16:36:26 +00:00
|
|
|
{ self, lib, ... }:
|
2024-06-19 14:56:26 +00:00
|
|
|
let
|
|
|
|
clan-core = self;
|
|
|
|
in
|
|
|
|
{
|
2024-06-21 15:00:44 +00:00
|
|
|
# Extension of the build clan interface
|
2024-06-21 20:46:12 +00:00
|
|
|
# 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 ...
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# };
|
2024-06-21 14:45:38 +00:00
|
|
|
|
2024-06-19 14:56:26 +00:00
|
|
|
clan = clan-core.lib.buildClan {
|
2024-06-21 20:46:12 +00:00
|
|
|
meta.name = "sams's clans";
|
2024-06-19 14:56:26 +00:00
|
|
|
# Should usually point to the directory of flake.nix
|
|
|
|
directory = self;
|
|
|
|
|
2024-06-21 20:46:12 +00:00
|
|
|
# services = {
|
|
|
|
# borgbackup = {
|
|
|
|
# roles.server.machines = [ "vyr_machine" ];
|
|
|
|
# roles.client.tags = [ "laptop" ];
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
|
|
|
|
# OR
|
|
|
|
inventory = builtins.fromJSON (builtins.readFile ./src/tests/borgbackup.json);
|
|
|
|
|
2024-06-19 14:56:26 +00:00
|
|
|
machines = {
|
2024-06-21 20:46:12 +00:00
|
|
|
"vyr_machine" = { };
|
2024-06-19 14:56:26 +00:00
|
|
|
"vi_machine" = {
|
2024-06-21 20:46:12 +00:00
|
|
|
clan.tags = [ "laptop" ];
|
2024-06-19 14:56:26 +00:00
|
|
|
};
|
|
|
|
"camina_machine" = {
|
2024-06-21 20:46:12 +00:00
|
|
|
clan.tags = [ "laptop" ];
|
|
|
|
clan.meta.name = "camina";
|
2024-06-19 14:56:26 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|