feat: added syncthing

This commit is contained in:
Nick 2025-10-10 02:03:44 -05:00
parent 5da8744578
commit 5a5f7ed62d
4 changed files with 34 additions and 31 deletions

View file

@ -6,13 +6,15 @@ let
mars
ceres
;
inherit (flake.config.services.instances)
syncthing
web
inherit (flake.config.services)
instances
;
hostname = config.networking.hostName;
localhost = web.localhost.address1;
service = syncthing;
localhost = instances.web.localhost.address1;
service = instances.syncthing;
postgres = instances.postgresql;
forgejo = instances.forgejo;
backupPath = "${service.paths.path1}";
syncDevices = {
synologySync = {
@ -59,6 +61,16 @@ in
};
};
systemd.tmpfiles.rules = [
# Main syncthing directory
"d ${service.paths.path0} 0755 ${service.name} ${service.name} -"
# Backup directories
"d ${backupPath} 0755 ${service.name} ${service.name} -"
"d ${backupPath}/${postgres.name} 0755 ${postgres.name} ${service.name} -"
"d ${backupPath}/${forgejo.name} 0750 ${forgejo.name} ${service.name} -"
];
networking = {
firewall = {
allowedTCPPorts = [