feat: added syncthing

This commit is contained in:
Nick 2025-10-10 00:37:28 -05:00
parent 1c65610138
commit 3f122f1628

View file

@ -5,10 +5,16 @@
}:
let
inherit (flake.config.machines.devices) ceres;
inherit (flake.config.services.instances) smtp forgejo web;
inherit (flake.config.services.instances)
smtp
forgejo
syncthing
web
;
service = forgejo;
localhost = web.localhost.address0;
host = service.domains.url0;
backupPath = "${syncthing.paths.path0}/${service.name}";
in
{
services = {
@ -25,6 +31,7 @@ in
type = "zip";
file = "forgejo-backup";
enable = true;
backupDir = backupPath;
};
settings = {
server = {
@ -101,6 +108,9 @@ in
systemd.tmpfiles.rules = [
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
"Z ${service.sops.path0} 755 ${service.name} ${service.name} -"
"d ${backupPath} 0750 ${service.name} ${instances.syncthing.name} -"
];
users.users.${service.name}.extraGroups = [