1
Fork 0
satellite/hosts/nixos/common/optional/services/syncthing.nix

33 lines
915 B
Nix
Raw Normal View History

2023-07-17 16:50:07 +02:00
let
user = "adrielus";
group = "syncthing";
2023-12-12 14:32:06 +01:00
dataDir = "/persist/data/syncthing";
2023-07-17 16:50:07 +02:00
in
2023-07-07 21:25:05 +02:00
{
services.syncthing = {
2023-12-12 14:32:06 +01:00
inherit user group dataDir;
2023-07-07 21:25:05 +02:00
enable = true;
openDefaultPorts = true;
2023-12-12 14:32:06 +01:00
configDir = "/persist/state/home/adrielus/syncthing/.config/syncthing";
2023-07-07 21:25:05 +02:00
overrideDevices = true;
overrideFolders = true;
settings = {
2023-12-12 14:32:06 +01:00
# {{{ Device ids
devices = {
enceladus.id = "QWOAERM-V2FNXPI-TB7NFUS-LKW7JTB-IZY4OEZ-FYDPJNP-6IKPW4Y-YREXDQM";
lapetus.id = "VVHM7RC-ZSDOZJI-EGBIJR4-2DOGAXG-OEJZWSH-OYUK5XT-7CDMWSL-3AVM2AZ";
tethys.id = "NGHX5G4-IY3ZXL2-NQMMRQV-2GDQLC6-LIDWSNG-DAJUAQH-KBAP64V-55K2LQ6";
};
2023-12-12 14:32:06 +01:00
# }}}
2023-07-07 21:25:05 +02:00
2023-12-10 12:55:54 +01:00
extraOptions.options.crashReportingEnabled = false;
2023-07-17 16:50:07 +02:00
};
2023-07-07 21:25:05 +02:00
};
2023-12-12 14:32:06 +01:00
# I'm not sure this is needed anymore, I just know I got some ownership errors at some point.
systemd.tmpfiles.rules = [ "d ${dataDir} - ${user} ${group} -" ];
2023-07-07 21:25:05 +02:00
}