refactor: further progress

This commit is contained in:
2026-04-25 00:19:20 +02:00
parent 55fbe82a42
commit 0500aab3cb
31 changed files with 680 additions and 398 deletions
+25 -13
View File
@@ -1,19 +1,31 @@
{
config,
lib,
...
}:
let
syncthingMesh = lib.listToAttrs (
lib.concatMap (
machine:
lib.mapAttrsToList (
userName: user:
let
name = "${userName}@${machine.name}";
in
{
inherit name;
value = {
inherit name;
id = user.syncthingId;
};
}
) (lib.filterAttrs (_: user: user.syncthingId != null) machine.users)
) (builtins.attrValues config.repo.machines)
);
in
{
flake.modules.homeManager.syncthing =
{ ... }:
let
syncthingMesh = {
"kiri@orion" = {
name = "kiri@orion";
id = "NNRNQKZ-OWPHSVA-B6KKBHE-SDYLSTV-7SVHGPR-NEWLKPL-4MWNJG4-G5FHUAI";
};
"kiri@polaris" = {
name = "kiri@polaris";
id = "6HBAKXB-DB3B4H2-BODCAXF-KD23H5W-6X5LGLC-ZJHZHLG-7U7YMGO-BB6IXQ3";
};
};
in
{
services.syncthing = {
enable = true;