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

46 lines
1 KiB
Nix
Raw Normal View History

2023-07-17 16:50:07 +02:00
let
user = "adrielus";
group = "syncthing";
in
2023-07-07 21:25:05 +02:00
{
services.syncthing = {
2023-07-17 16:50:07 +02:00
inherit user group;
2023-07-07 21:25:05 +02:00
enable = true;
openDefaultPorts = true;
2023-07-17 16:50:07 +02:00
configDir = "/persist/state/home/adrielus/Syncthing/.config/syncthing";
2023-07-07 21:25:05 +02:00
dataDir = "/persist/data/syncthing";
# guiAddress = "0.0.0.0:8384"; # TODO: put this behind nginx
overrideDevices = true;
overrideFolders = true;
devices = {
"enceladus" = { id = "QWOAERM-V2FNXPI-TB7NFUS-LKW7JTB-IZY4OEZ-FYDPJNP-6IKPW4Y-YREXDQM"; };
};
2023-07-17 16:50:07 +02:00
extraOptions = {
options = {
crashReportingEnabled = false;
};
};
2023-07-07 21:25:05 +02:00
folders = {
"stellar-sanctum" = {
path = "/home/adrielus/Projects/stellar-sanctum/";
devices = [ "enceladus" ];
# TODO: remove this once I switch to zfs
versioning = {
type = "staggered";
params = {
cleanInterval = "3600"; # 1 hour in seconds
maxAge = "604800"; # 14 days in seconds.
};
};
};
};
};
}