Polish mock syncthing config
This commit is contained in:
parent
1210a4b2ed
commit
0325968f12
|
@ -29,21 +29,37 @@ with lib;
|
||||||
# So thw bitwarden CLI knows where to find my server.
|
# So thw bitwarden CLI knows where to find my server.
|
||||||
modules.shell.bitwarden.config.server = "p.v0.io";
|
modules.shell.bitwarden.config.server = "p.v0.io";
|
||||||
|
|
||||||
services.syncthing.declarative = {
|
|
||||||
devices = {
|
## Not using syncthing atm
|
||||||
kuro.id = "4UJSUBN-V7LCISG-6ZE7SBN-YPXM5FQ-CE7CD2U-W4KZC7O-4HUZZSW-6DXAGQQ";
|
# services.syncthing.declarative = {
|
||||||
shiro.id = "G4DUO25-AMQQIWS-SRZE5TJ-43CCQZJ-5ULEZBS-P2LMZZU-V5JA5CS-6X7RLQK";
|
# # Purge folders not declaratively configured!
|
||||||
kiiro.id = "DPQT4XQ-Q4APAYJ-T7P4KMY-YBLDKLC-7AU5Y4S-VGT3DDT-TMZZEIX-GBA7DAM";
|
# overrideFolders = true;
|
||||||
};
|
# overrideDevices = true;
|
||||||
folders =
|
# devices = {
|
||||||
let mkShare = name: devices: type: path: rec {
|
# kuro.id = "4UJSUBN-V7LCISG-6ZE7SBN-YPXM5FQ-CE7CD2U-W4KZC7O-4HUZZSW-6DXAGQQ";
|
||||||
inherit devices type path;
|
# shiro.id = "G4DUO25-AMQQIWS-SRZE5TJ-43CCQZJ-5ULEZBS-P2LMZZU-V5JA5CS-6X7RLQK";
|
||||||
watch = false;
|
# kiiro.id = "3A6G2NR-WQMASWG-7EFUX6G-GJB6WYX-HYGDA7N-EYZYANY-NDRKI3W-32RQ4QG";
|
||||||
rescanInterval = 3600 * 4;
|
# };
|
||||||
enabled = lib.elem config.networking.hostname devices;
|
# folders =
|
||||||
};
|
# let mkShare = devices: type: paths: attrs: (rec {
|
||||||
in {
|
# inherit devices type;
|
||||||
projects = mkShare "projects" [ "kuro" "shiro" ] "sendrecieve" "${config.user.home}/projects";
|
# path = if lib.isAttrs paths
|
||||||
};
|
# then paths."${config.networking.hostName}"
|
||||||
};
|
# else paths;
|
||||||
|
# watch = false;
|
||||||
|
# rescanInterval = 3600; # every hour
|
||||||
|
# enable = lib.elem config.networking.hostName devices;
|
||||||
|
# } // attrs);
|
||||||
|
# in {
|
||||||
|
# projects = mkShare [ "kuro" "shiro" ] "sendreceive" # "${config.user.home}/projects"
|
||||||
|
# { watch = true;
|
||||||
|
# rescanInterval = 3600 * 4; }; # every 4 hours
|
||||||
|
# serverBackup = mkShare [ "ao" "kiiro" ] "sendonly" "/run/backups"
|
||||||
|
# mainBackup = mkShare [ "kuro" "kiiro" ] "sendreceive" # "/usr/store"
|
||||||
|
# { versioning = {
|
||||||
|
# type = "staggered";
|
||||||
|
# params.maxAge = "356";
|
||||||
|
# }; };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
|
|
||||||
|
|
||||||
## Backups
|
# Syncthing is a bit heavy handed for my needs, so rsync to my NAS instead.
|
||||||
systemd = {
|
systemd = {
|
||||||
services.backups = {
|
services.backups = {
|
||||||
description = "Back up personal files";
|
description = "Back up personal files";
|
||||||
|
|
|
@ -13,8 +13,8 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
openDefaultPorts = true;
|
openDefaultPorts = true;
|
||||||
user = config.user.name;
|
user = config.user.name;
|
||||||
configDir = "/home/${user}/.config/syncthing";
|
configDir = "${config.user.home}/.config/syncthing";
|
||||||
dataDir = "/home/${user}/.local/share/syncthing";
|
dataDir = "${config.user.home}/.local/share/syncthing";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue