Syncthing: try to update config per new options

And also disable
This commit is contained in:
Payas Relekar 2023-07-23 22:03:00 +05:30
parent c040e2811d
commit d1b659a55f
3 changed files with 100 additions and 93 deletions

View file

@ -47,7 +47,7 @@
Music = {
devices = [ "hermes" "Childish Tycoon" ];
type = "receiveonly";
watch = true;
fsWatcherEnabled = true;
};
};
};

View file

@ -7,23 +7,24 @@
services.syncthing = {
guiAddress = "127.0.0.1:8384";
settings = {
folders = {
Keepass = {
"~/Keepass" = {
enable = true;
devices = [ "bebop" "Childish Tycoon" ];
type = "sendreceive";
watch = true;
fsWatcherEnabled = true;
versioning = {
type = "simple";
params.keep = "5";
};
};
Syncthing = {
"~/Syncthing" = {
enable = true;
devices = [ "bebop" "Childish Tycoon" ];
type = "sendreceive";
watch = true;
fsWatcherEnabled = true;
versioning = {
type = "staggered";
params = {
@ -33,27 +34,28 @@
};
};
org = {
"~/org" = {
enable = true;
devices = [ "bebop" "Childish Tycoon" ];
type = "sendreceive";
watch = true;
fsWatcherEnabled = true;
};
Music = {
"~/Music" = {
enable = true;
devices = [ "bebop" "Childish Tycoon" ];
type = "sendreceive";
watch = true;
fsWatcherEnabled = true;
};
Pictures = {
"~/Pictures" = {
enable = false;
# Kept as future reminder
devices = [ ]; # no pause option in NixOS module, no sharing is as good as paused
type = "sendreceive";
watch = false; # disabled folder, no need to watch
fsWatcherEnabled = false; # disabled folder, no need to fsWatcherEnabled
};
};
};
};

View file

@ -9,9 +9,10 @@ in
# - Make ALL the nodes use this declaratively :)
{
services.syncthing = {
enable = true;
enable = false;
openDefaultPorts = true;
user = payas;
group = payas;
configDir = "/home/${payas}/.config/syncthing/";
# Hosts can opt-out of folders with enable = false
@ -20,32 +21,35 @@ in
# overrideFolders = true;
overrideDevices = false;
extraOptions = {
settings = {
options = {
urAccepted = -1;
relaysEnabled = true;
limitBandwidthInLan = false;
localAnnounceEnabled = true;
};
gui = {
theme = "black";
};
};
devices = {
hermes = {
id =
"LYFSPF4-L6C24OM-IDYZAUT-5D32FAS-FCHN7FR-CUPWEEE-YOZYBQ3-RL5T5Q6";
name = "hermes";
introducer = false; # Only use declaratively configured devices
};
"Childish Tycoon" = {
id =
"ERSVP63-ASZCCJB-FWLSZ3N-MDZ4SV5-IXBP5QD-QK235LI-DY5BYRC-6NSWUQS";
name = "Childish Tycoon";
introducer = false; # Only use declaratively configured devices
};
bebop = {
id =
"M6OJZSY-MPOQY76-BSZUFBQ-QK7LBM6-3YBOJZS-5H2K7UV-S6B34ON-THT3OAI";
name = "bebop";
introducer = false; # Only use declaratively configured devices
};
};
@ -53,35 +57,36 @@ in
# devices, type and versioning to be configured per-node
# Disable unwanted folder in per-node config
Keepass = {
"~/Keepass" = {
id = "qsoil-jtfof";
label = "Keepass";
path = "/home/${payas}/Keepass";
};
Syncthing = {
"~/Syncthing" = {
id = "yg7in-0dlb8";
label = "Syncthing";
path = "/home/${payas}/Syncthing";
};
Music = {
"~/Music" = {
id = "3qsnr-wjn9w";
label = "Music";
path = "/home/${payas}/Music";
};
org = {
"~/org" = {
id = "9ta3z-yrde3";
label = "org";
path = "/home/${payas}/org";
};
Pictures = {
"~/Pictures" = {
id = "rjozc-vd3hh";
label = "Pictures";
path = "/home/${payas}/Pictures";
};
};
};
};
}