nixos-config/services/syncthing/felix-nixos.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

2020-10-06 17:41:56 +02:00
{ config, pkgs, ... }:
2021-05-13 00:30:09 +02:00
let
versioning = {
type = "trashcan";
params.cleanoutDays = "30";
};
in {
2020-10-06 17:41:56 +02:00
services.syncthing = {
enable = true;
openDefaultPorts = true;
user = "felschr";
configDir = "/home/felschr/.config/syncthing";
dataDir = "/home/felschr/.local/share/syncthing";
declarative = {
cert = "/etc/nixos/secrets/syncthing/cert.pem";
key = "/etc/nixos/secrets/syncthing/key.pem";
devices = {
rpi4 = {
id =
"RBKVWQQ-TGYBMQK-P4AADKE-7LGPHL7-UY4FEZA-6N7HQ4R-UCPSZPV-LWFK4AP";
};
pixel3 = {
id =
2021-03-21 11:58:03 +01:00
"YM26ZEC-V5QQTOI-7U355KQ-WTHLL3X-H3YVJR5-4UPM5SS-YXWGVGA-EBWZEQP";
2020-10-06 17:41:56 +02:00
};
};
folders = {
"Default" = {
id = "default";
path = "/home/felschr/sync/default";
devices = [ "rpi4" "pixel3" ];
};
"Backups" = {
id = "backups";
path = "/home/felschr/sync/backups";
devices = [ "rpi4" ];
};
"Media" = {
id = "media";
2021-05-13 00:30:09 +02:00
path = "/run/media/felschr/HDD/Media";
2020-10-06 17:41:56 +02:00
devices = [ "rpi4" ];
2021-05-13 00:30:09 +02:00
inherit versioning;
2020-10-06 17:41:56 +02:00
};
};
};
};
}