This commit is contained in:
2026-02-28 19:41:14 +01:00
parent 0c81f68a63
commit 5f34d32807
53 changed files with 1303 additions and 1386 deletions

View File

@@ -0,0 +1,49 @@
{
inputs,
den,
lib,
...
}:
let
meshDevices = lib.listToAttrs (
lib.concatMap (
host:
lib.mapAttrsToList (
userName: user:
let
name = "${userName}@${host.name}";
in
{
inherit name;
value = {
inherit name;
id = user.syncthingId;
};
}
) (lib.filterAttrs (_: u: u ? syncthingId) host.users)
) (lib.attrValues den.hosts.x86_64-linux)
);
in
{
lux.syncthing = {
homeManager = {
services.syncthing = {
enable = true;
overrideDevices = true;
overrideFolders = true;
settings = {
folders = {
sync = {
path = "~/sync";
label = "sync";
devices = lib.attrNames meshDevices;
};
};
devices = meshDevices;
};
};
};
};
}