syncthing: add versioning to the most important folders

This commit is contained in:
Ingolf Wagner 2020-09-01 22:27:22 +02:00
parent 47e9a0e662
commit 131a6b1d8b
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
6 changed files with 43 additions and 76 deletions

View file

@ -97,7 +97,7 @@ in {
services.SystemdJournal2Gelf.enable = true; services.SystemdJournal2Gelf.enable = true;
services.SystemdJournal2Gelf.graylogServer = "${hostAddress}:11201"; services.SystemdJournal2Gelf.graylogServer = "${hostAddress}:11201";
services.journald.extraConfig = ''SystemMaxUse=1G''; services.journald.extraConfig = "SystemMaxUse=1G";
}; };
}; };

View file

@ -28,10 +28,6 @@
private = { private = {
enable = true; enable = true;
path = "/home/syncthing/private"; path = "/home/syncthing/private";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
desktop = { desktop = {
enable = true; enable = true;
@ -40,18 +36,10 @@
finance = { finance = {
enable = true; enable = true;
path = "/home/syncthing/finance"; path = "/home/syncthing/finance";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
fotos = { fotos = {
enable = true; enable = true;
path = "/home/syncthing/fotos"; path = "/home/syncthing/fotos";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
lost-fotos = { lost-fotos = {
enable = true; enable = true;
@ -64,10 +52,6 @@
zettlr = { zettlr = {
enable = true; enable = true;
path = "/home/syncthing/zettlr"; path = "/home/syncthing/zettlr";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
# on media hard drive (not encrypted) # on media hard drive (not encrypted)
@ -90,46 +74,26 @@
enable = true; enable = true;
path = "/media/syncthing/samples"; path = "/media/syncthing/samples";
rescanInterval = 8 * 3600; rescanInterval = 8 * 3600;
versioning = {
type = "simple";
params.keep = "10";
};
}; };
movies = { movies = {
enable = true; enable = true;
path = "/media/syncthing/movies"; path = "/media/syncthing/movies";
rescanInterval = 8 * 3600; rescanInterval = 8 * 3600;
versioning = {
type = "simple";
params.keep = "10";
};
}; };
music-library = { music-library = {
enable = true; enable = true;
path = "/media/syncthing/music-library"; path = "/media/syncthing/music-library";
rescanInterval = 8 * 3600; rescanInterval = 8 * 3600;
versioning = {
type = "simple";
params.keep = "10";
};
}; };
series = { series = {
enable = true; enable = true;
path = "/media/syncthing/series"; path = "/media/syncthing/series";
rescanInterval = 8 * 3600; rescanInterval = 8 * 3600;
versioning = {
type = "simple";
params.keep = "10";
};
}; };
smartphone-folder = { smartphone-folder = {
enable = true; enable = true;
path = "/media/syncthing/smartphone-folder"; path = "/media/syncthing/smartphone-folder";
rescanInterval = 8 * 3600; rescanInterval = 8 * 3600;
versioning = {
type = "simple";
params.keep = "10";
};
}; };
}; };

View file

@ -47,7 +47,7 @@ in {
services.SystemdJournal2Gelf.enable = true; services.SystemdJournal2Gelf.enable = true;
services.SystemdJournal2Gelf.graylogServer = "${hostAddress}:11201"; services.SystemdJournal2Gelf.graylogServer = "${hostAddress}:11201";
services.journald.extraConfig = ''SystemMaxUse=1G''; services.journald.extraConfig = "SystemMaxUse=1G";
services.transmission = { services.transmission = {
enable = true; enable = true;

View file

@ -22,10 +22,6 @@
finance = { finance = {
enable = true; enable = true;
path = "/home/palo/finance"; path = "/home/palo/finance";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
lost-fotos = { lost-fotos = {
enable = true; enable = true;
@ -34,10 +30,6 @@
fotos = { fotos = {
enable = true; enable = true;
path = "/home/palo/fotos"; path = "/home/palo/fotos";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
# no need to be encrypted # no need to be encrypted
@ -45,50 +37,26 @@
book = { book = {
enable = true; enable = true;
path = "/home/palo/books"; path = "/home/palo/books";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
music-library-free = { music-library-free = {
enable = true; enable = true;
path = "/home/palo/music-library-free"; path = "/home/palo/music-library-free";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
music-library = { music-library = {
enable = true; enable = true;
path = "/home/palo/music-library"; path = "/home/palo/music-library";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
music-projects = { music-projects = {
enable = true; enable = true;
path = "/home/palo/music-projects"; path = "/home/palo/music-projects";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
samples = { samples = {
enable = true; enable = true;
path = "/home/palo/samples"; path = "/home/palo/samples";
versioning = {
type = "simple";
params.keep = "2";
};
}; };
video-material = { video-material = {
enable = true; enable = true;
path = "/home/palo/video-material"; path = "/home/palo/video-material";
versioning = {
type = "simple";
params.keep = "2";
};
}; };
windows-sync = { windows-sync = {
enable = true; enable = true;
@ -101,10 +69,6 @@
zettlr = { zettlr = {
enable = true; enable = true;
path = "/home/palo/zettlr"; path = "/home/palo/zettlr";
versioning = {
type = "simple";
params.keep = "10";
};
}; };
}; };
}; };

View file

@ -60,6 +60,10 @@ with lib; {
enable = lib.mkDefault false; enable = lib.mkDefault false;
watch = false; watch = false;
devices = [ "workout" "workhorse" "pepe" "sterni" ]; devices = [ "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
desktop = { desktop = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
@ -70,16 +74,28 @@ with lib; {
enable = lib.mkDefault false; enable = lib.mkDefault false;
watch = false; watch = false;
devices = [ "workout" "workhorse" "pepe" "sterni" ]; devices = [ "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
fotos = { fotos = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
watch = false; watch = false;
devices = [ "workout" "workhorse" "pepe" "sterni" ]; devices = [ "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
zettlr = { zettlr = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
watch = true; watch = true;
devices = [ "workout" "workhorse" "pepe" "sterni" ]; devices = [ "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
# no need to be stored on encrypted drives # no need to be stored on encrypted drives
@ -89,12 +105,20 @@ with lib; {
id = "wwbvs-5lfbh"; id = "wwbvs-5lfbh";
watch = false; watch = false;
devices = [ "workout" "pepe" "sterni" ]; devices = [ "workout" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
movies = { movies = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
id = "vatmy-c2qf4"; id = "vatmy-c2qf4";
watch = false; watch = false;
devices = [ "workhorse" "pepe" "porani" ]; devices = [ "workhorse" "pepe" "porani" ];
versioning = {
type = "simple";
params.keep = "3";
};
}; };
porn = { porn = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
@ -106,6 +130,10 @@ with lib; {
id = "gytmq-r2zrx"; id = "gytmq-r2zrx";
watch = false; watch = false;
devices = [ "porani" "workout" "workhorse" "pepe" "sterni" ]; devices = [ "porani" "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
music-library-free = { music-library-free = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
@ -118,6 +146,10 @@ with lib; {
id = "acfhu-r4t4f"; id = "acfhu-r4t4f";
watch = false; watch = false;
devices = [ "workout" "workhorse" "pepe" "sterni" ]; devices = [ "workout" "workhorse" "pepe" "sterni" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
smartphone-folder = { smartphone-folder = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
@ -135,14 +167,21 @@ with lib; {
id = "all-series"; id = "all-series";
watch = false; watch = false;
devices = [ "workhorse" "porani" "pepe" ]; devices = [ "workhorse" "porani" "pepe" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
video-material = { video-material = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
id = "wgkun-fec5h"; id = "wgkun-fec5h";
watch = false; watch = false;
devices = [ "workout" "workhorse" "pepe" ]; devices = [ "workout" "workhorse" "pepe" ];
versioning = {
type = "simple";
params.keep = "10";
};
}; };
windows-sync = { windows-sync = {
enable = lib.mkDefault false; enable = lib.mkDefault false;
id = "hcity-p5ikc"; id = "hcity-p5ikc";