nixos/system/services/syncthing.nix

59 lines
1.6 KiB
Nix

{...}: let
devices = ["Ion" "Legion" "Northstar" "Vanguard"];
in {
imports = [./caddy.nix];
services.syncthing = {
enable = true;
systemService = true;
overrideDevices = true;
overrideFolders = true;
openDefaultPorts = true;
settings = {
devices = {
"Ion".id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";
"Legion".id = "XIJ4CPX-3USDOFM-JLKWEPP-J7MEVKX-LJ6HCCS-YZNHGGC-GDSMZPD-TTVYNAZ";
"Northstar".id = "2GDDHJC-MIT5RCN-YR4ZQ4M-VYPP5NJ-UKMQDCN-RCCF7AK-WG5AHXU-4KINIQX";
"Vanguard".id = "UT6YVRQ-K6UVH3V-XMAFNO6-TN3QIIN-5GBGPST-QFJJTSJ-SCKBJGP-PQBZVQW";
};
folders = {
"Music" = {
inherit devices;
id = "munzw-vnxhl";
path = "~/Music";
ignorePerms = true;
};
"Pictures" = {
inherit devices;
id = "ziuj8-rm6dn";
path = "~/Pictures";
ignorePerms = true;
};
"Videos" = {
inherit devices;
id = "mbsop-qteua";
path = "~/Videos";
ignorePerms = true;
};
"Documents" = {
inherit devices;
id = "4bxk7-zkrt2";
path = "~/Documents/sync";
ignorePerms = true;
};
"Books" = {
inherit devices;
id = "5zaud-r3rtt";
path = "~/Documents/books";
ignorePerms = true;
};
"ROMs" = {
inherit devices;
id = "xjbwf-b6qgd";
path = "~/Games/ROMs";
ignorePerms = true;
};
};
};
};
}