Flake for my NixOS devices
1{...}: {
2 config,
3 lib,
4 ...
5}: {
6 options.cow.sync.enable = lib.mkEnableOption "syncing via SyncThing";
7
8 config = lib.mkIf config.cow.sync.enable {
9 cow.imperm.keepCache = [".local/state/syncthing"];
10
11 cow.firewall = {
12 tcp = [22000];
13 udp = [21027 22000];
14 };
15
16 services.syncthing = {
17 enable = true;
18
19 overrideFolders = false;
20 overrideDevices = false;
21
22 settings.options.urAccepted = -1;
23 };
24 };
25}