Syncthing: try to update config per new options
And also disable
This commit is contained in:
parent
c040e2811d
commit
d1b659a55f
3 changed files with 100 additions and 93 deletions
|
@ -47,7 +47,7 @@
|
||||||
Music = {
|
Music = {
|
||||||
devices = [ "hermes" "Childish Tycoon" ];
|
devices = [ "hermes" "Childish Tycoon" ];
|
||||||
type = "receiveonly";
|
type = "receiveonly";
|
||||||
watch = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,53 +7,55 @@
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
guiAddress = "127.0.0.1:8384";
|
guiAddress = "127.0.0.1:8384";
|
||||||
|
|
||||||
folders = {
|
settings = {
|
||||||
Keepass = {
|
folders = {
|
||||||
enable = true;
|
"~/Keepass" = {
|
||||||
devices = [ "bebop" "Childish Tycoon" ];
|
enable = true;
|
||||||
type = "sendreceive";
|
devices = [ "bebop" "Childish Tycoon" ];
|
||||||
watch = true;
|
type = "sendreceive";
|
||||||
versioning = {
|
fsWatcherEnabled = true;
|
||||||
type = "simple";
|
versioning = {
|
||||||
params.keep = "5";
|
type = "simple";
|
||||||
};
|
params.keep = "5";
|
||||||
};
|
|
||||||
|
|
||||||
Syncthing = {
|
|
||||||
enable = true;
|
|
||||||
devices = [ "bebop" "Childish Tycoon" ];
|
|
||||||
type = "sendreceive";
|
|
||||||
watch = true;
|
|
||||||
versioning = {
|
|
||||||
type = "staggered";
|
|
||||||
params = {
|
|
||||||
cleanInterval = "3600";
|
|
||||||
maxAge = "31536000";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
org = {
|
"~/Syncthing" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
devices = [ "bebop" "Childish Tycoon" ];
|
devices = [ "bebop" "Childish Tycoon" ];
|
||||||
type = "sendreceive";
|
type = "sendreceive";
|
||||||
watch = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
versioning = {
|
||||||
|
type = "staggered";
|
||||||
|
params = {
|
||||||
|
cleanInterval = "3600";
|
||||||
|
maxAge = "31536000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
Music = {
|
"~/org" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
devices = [ "bebop" "Childish Tycoon" ];
|
devices = [ "bebop" "Childish Tycoon" ];
|
||||||
type = "sendreceive";
|
type = "sendreceive";
|
||||||
watch = true;
|
fsWatcherEnabled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"~/Music" = {
|
||||||
|
enable = true;
|
||||||
|
devices = [ "bebop" "Childish Tycoon" ];
|
||||||
|
type = "sendreceive";
|
||||||
|
fsWatcherEnabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
Pictures = {
|
"~/Pictures" = {
|
||||||
enable = false;
|
enable = false;
|
||||||
# Kept as future reminder
|
# Kept as future reminder
|
||||||
devices = [ ]; # no pause option in NixOS module, no sharing is as good as paused
|
devices = [ ]; # no pause option in NixOS module, no sharing is as good as paused
|
||||||
type = "sendreceive";
|
type = "sendreceive";
|
||||||
watch = false; # disabled folder, no need to watch
|
fsWatcherEnabled = false; # disabled folder, no need to fsWatcherEnabled
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,9 +9,10 @@ in
|
||||||
# - Make ALL the nodes use this declaratively :)
|
# - Make ALL the nodes use this declaratively :)
|
||||||
{
|
{
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = false;
|
||||||
openDefaultPorts = true;
|
openDefaultPorts = true;
|
||||||
user = payas;
|
user = payas;
|
||||||
|
group = payas;
|
||||||
configDir = "/home/${payas}/.config/syncthing/";
|
configDir = "/home/${payas}/.config/syncthing/";
|
||||||
|
|
||||||
# Hosts can opt-out of folders with enable = false
|
# Hosts can opt-out of folders with enable = false
|
||||||
|
@ -20,67 +21,71 @@ in
|
||||||
# overrideFolders = true;
|
# overrideFolders = true;
|
||||||
overrideDevices = false;
|
overrideDevices = false;
|
||||||
|
|
||||||
extraOptions = {
|
settings = {
|
||||||
|
options = {
|
||||||
|
urAccepted = -1;
|
||||||
|
relaysEnabled = true;
|
||||||
|
limitBandwidthInLan = false;
|
||||||
|
localAnnounceEnabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
gui = {
|
gui = {
|
||||||
theme = "black";
|
theme = "black";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
devices = {
|
devices = {
|
||||||
hermes = {
|
hermes = {
|
||||||
id =
|
id =
|
||||||
"LYFSPF4-L6C24OM-IDYZAUT-5D32FAS-FCHN7FR-CUPWEEE-YOZYBQ3-RL5T5Q6";
|
"LYFSPF4-L6C24OM-IDYZAUT-5D32FAS-FCHN7FR-CUPWEEE-YOZYBQ3-RL5T5Q6";
|
||||||
name = "hermes";
|
name = "hermes";
|
||||||
introducer = false; # Only use declaratively configured devices
|
};
|
||||||
|
|
||||||
|
"Childish Tycoon" = {
|
||||||
|
id =
|
||||||
|
"ERSVP63-ASZCCJB-FWLSZ3N-MDZ4SV5-IXBP5QD-QK235LI-DY5BYRC-6NSWUQS";
|
||||||
|
name = "Childish Tycoon";
|
||||||
|
};
|
||||||
|
|
||||||
|
bebop = {
|
||||||
|
id =
|
||||||
|
"M6OJZSY-MPOQY76-BSZUFBQ-QK7LBM6-3YBOJZS-5H2K7UV-S6B34ON-THT3OAI";
|
||||||
|
name = "bebop";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"Childish Tycoon" = {
|
folders = {
|
||||||
id =
|
# devices, type and versioning to be configured per-node
|
||||||
"ERSVP63-ASZCCJB-FWLSZ3N-MDZ4SV5-IXBP5QD-QK235LI-DY5BYRC-6NSWUQS";
|
# Disable unwanted folder in per-node config
|
||||||
name = "Childish Tycoon";
|
|
||||||
introducer = false; # Only use declaratively configured devices
|
|
||||||
};
|
|
||||||
|
|
||||||
bebop = {
|
"~/Keepass" = {
|
||||||
id =
|
id = "qsoil-jtfof";
|
||||||
"M6OJZSY-MPOQY76-BSZUFBQ-QK7LBM6-3YBOJZS-5H2K7UV-S6B34ON-THT3OAI";
|
label = "Keepass";
|
||||||
name = "bebop";
|
path = "/home/${payas}/Keepass";
|
||||||
introducer = false; # Only use declaratively configured devices
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
folders = {
|
"~/Syncthing" = {
|
||||||
# devices, type and versioning to be configured per-node
|
id = "yg7in-0dlb8";
|
||||||
# Disable unwanted folder in per-node config
|
label = "Syncthing";
|
||||||
|
path = "/home/${payas}/Syncthing";
|
||||||
|
};
|
||||||
|
|
||||||
Keepass = {
|
"~/Music" = {
|
||||||
id = "qsoil-jtfof";
|
id = "3qsnr-wjn9w";
|
||||||
label = "Keepass";
|
label = "Music";
|
||||||
path = "/home/${payas}/Keepass";
|
path = "/home/${payas}/Music";
|
||||||
};
|
};
|
||||||
|
|
||||||
Syncthing = {
|
"~/org" = {
|
||||||
id = "yg7in-0dlb8";
|
id = "9ta3z-yrde3";
|
||||||
label = "Syncthing";
|
label = "org";
|
||||||
path = "/home/${payas}/Syncthing";
|
path = "/home/${payas}/org";
|
||||||
};
|
};
|
||||||
|
|
||||||
Music = {
|
"~/Pictures" = {
|
||||||
id = "3qsnr-wjn9w";
|
id = "rjozc-vd3hh";
|
||||||
label = "Music";
|
label = "Pictures";
|
||||||
path = "/home/${payas}/Music";
|
path = "/home/${payas}/Pictures";
|
||||||
};
|
};
|
||||||
|
|
||||||
org = {
|
|
||||||
id = "9ta3z-yrde3";
|
|
||||||
label = "org";
|
|
||||||
path = "/home/${payas}/org";
|
|
||||||
};
|
|
||||||
|
|
||||||
Pictures = {
|
|
||||||
id = "rjozc-vd3hh";
|
|
||||||
label = "Pictures";
|
|
||||||
path = "/home/${payas}/Pictures";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue