feat: add phone to syncthing

This commit is contained in:
2026-05-05 16:28:49 +02:00
parent e8d1f58ed5
commit fdc269483e
+13 -4
View File
@@ -4,7 +4,7 @@
... ...
}: }:
let let
syncthingMesh = lib.listToAttrs ( syncMachines = lib.listToAttrs (
lib.concatMap ( lib.concatMap (
machine: machine:
lib.optional (machine.syncthingId != null) ( lib.optional (machine.syncthingId != null) (
@@ -21,6 +21,15 @@ let
) )
) (builtins.attrValues config.repo.machines) ) (builtins.attrValues config.repo.machines)
); );
syncPhones = {
"pixel-10" = {
name = "pixel-10";
id = "MTJHEHA-UMZDQZ7-BTMRRLQ-Y7BFPUJ-ZTY6LZX-PDXV3IS-XVJCU7B-EPETBQZ";
};
};
syncDevices = syncMachines // syncPhones;
in in
{ {
flake.modules.homeManager.syncthing = flake.modules.homeManager.syncthing =
@@ -37,15 +46,15 @@ in
sync = { sync = {
path = "~/sync"; path = "~/sync";
label = "sync"; label = "sync";
devices = builtins.attrNames syncthingMesh; devices = builtins.attrNames syncDevices;
}; };
calibre = { calibre = {
path = "~/calibre"; path = "~/calibre";
label = "calibre"; label = "calibre";
devices = builtins.attrNames syncthingMesh; devices = builtins.attrNames syncMachines;
}; };
}; };
devices = syncthingMesh; devices = syncDevices;
}; };
}; };
}; };