panacea/modules/datasync.nix

90 lines
2.0 KiB
Nix
Raw Normal View History

2020-04-29 02:50:17 +02:00
{ config, lib, pkgs, ... }:
{
# ZFS automatic backup solution
services.znapzend = {
enable = true;
autoCreation = true;
features = {
compressed = true;
recvu = true;
};
zetup = {
2020-05-10 03:13:30 +02:00
"syscea/stateful/root" = {
2020-04-29 02:50:17 +02:00
plan = "1d=>1h,1m=>1d,1y=>1m";
recursive = true;
2020-05-09 18:53:22 +02:00
mbuffer.enable = true;
2020-04-29 02:50:17 +02:00
destinations.remote = {
host = "coolneng@zion";
2020-05-10 03:13:30 +02:00
dataset = "vault/backups/panacea/root";
2020-04-29 02:50:17 +02:00
};
};
2020-05-10 03:13:30 +02:00
"syscea/stateful/home" = {
2020-04-29 02:50:17 +02:00
plan = "1d=>1h,1m=>1d,1y=>1m";
recursive = true;
2020-05-09 18:53:22 +02:00
mbuffer.enable = true;
2020-04-29 02:50:17 +02:00
destinations.remote = {
host = "coolneng@zion";
2020-05-10 03:13:30 +02:00
dataset = "vault/backups/panacea/home";
2020-04-29 02:50:17 +02:00
};
};
};
};
2020-04-30 03:02:54 +02:00
# Syncthing configuration
services.syncthing = {
enable = true;
2020-05-09 18:53:22 +02:00
user = "coolneng";
2020-04-30 03:02:54 +02:00
dataDir = "/home/coolneng";
declarative = {
devices = {
2020-05-10 03:13:30 +02:00
zion = { id = "XABIMVG-K5RKMAF-KNC33AR-TDAVEGK-GHUIVFD-NIFCX6L-6PQXRM5-KLK2PAU"; };
2020-04-30 03:02:54 +02:00
};
folders = {
Documents = {
id = "wusdj-bfjkr";
path = "/home/coolneng/Documents";
devices = [ "zion" ];
versioning = {
type = "simple";
params = {
keep = "5";
};
};
};
Notes = {
id = "kafhz-bfmzm";
path = "/home/coolneng/Notes";
devices = [ "zion" ];
versioning = {
type = "simple";
params = {
keep = "5";
};
};
};
Music = {
id = "2aqt7-vpprc";
path = "/home/coolneng/Music";
devices = [ "zion" ];
};
Photos = {
id = "mjibc-ustcg";
path = "/home/coolneng/Photos";
devices = [ "zion" ];
};
Projects = {
id = "cjhmu-avy9v";
path = "/home/coolneng/Projects";
devices = [ "zion" ];
};
};
};
};
2020-04-29 02:50:17 +02:00
}