nixos/services/syncthing.nix
Evie Litherland-Smith a853475779 Initial convert from traefik to caddy
Move (hopefully) all reverse proxies to caddy
Left off adguard for now, tbd if it needs outside access

Moved service expressions up a level since it was a bit unneccesary before
2023-11-20 08:19:13 +00:00

53 lines
1.4 KiB
Nix

{ ... }:
let devices = [ "Ion" "Legion" "Northstar" "Ronin" "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 =
"3SSNCLP-ZZKNS65-7CKKGFY-KJYQU6S-P5BM7SB-MMW5ZLM-TMND6IV-ZMUO4AQ";
"Northstar".id =
"DJVVFUX-QRJNEUZ-OVEQ63J-KJIGNY7-O4MEOMH-GDKYHOB-BQES3O4-C3BJHQ2";
"Ronin".id =
"WNM6YCB-K2ZHB4E-J3A3NFI-DE4QKAD-QCNNYGS-QUTVFOG-NWFHVJQ-CUDXKQD";
"Vanguard".id =
"NCJBYBK-JRVFAAN-XO4I5AS-B5L7QD2-5PAMWX7-PHD5FQH-Q2EI32H-U3GF5AA";
};
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;
};
};
};
};
services.caddy.virtualHosts."sync.xenia.me.uk".extraConfig = ''
basic_auth {
evie $apr1$LB0wVd6I$BHVPIyh.F5Ewt9/7PqAtS.
}
reverse_proxy http://localhost:8384
'';
}