refactor: schema

This commit is contained in:
2026-05-06 21:57:58 +02:00
parent c01c13aa50
commit 4b6e05212c
27 changed files with 198 additions and 377 deletions
+17 -12
View File
@@ -5,21 +5,26 @@
}:
let
syncMachines = lib.listToAttrs (
lib.concatMap (
machine:
lib.optional (machine.syncthingId != null) (
lib.concatLists (
lib.mapAttrsToList (
machineName: machine:
let
name = "${config.repo.account.name}@${machine.name}";
syncthingId = machine.syncthingId or null;
in
{
inherit name;
value = {
lib.optional (syncthingId != null) (
let
name = "${config.repo.account.name}@${machineName}";
in
{
inherit name;
id = machine.syncthingId;
};
}
)
) (builtins.attrValues config.repo.machines)
value = {
inherit name;
id = syncthingId;
};
}
)
) config.repo.machines
)
);
syncPhones = {