mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 13:32:15 -06:00
feat: added syncthing
This commit is contained in:
parent
1c65610138
commit
3f122f1628
1 changed files with 11 additions and 1 deletions
|
|
@ -5,10 +5,16 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices) ceres;
|
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;
|
service = forgejo;
|
||||||
localhost = web.localhost.address0;
|
localhost = web.localhost.address0;
|
||||||
host = service.domains.url0;
|
host = service.domains.url0;
|
||||||
|
backupPath = "${syncthing.paths.path0}/${service.name}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
|
|
@ -25,6 +31,7 @@ in
|
||||||
type = "zip";
|
type = "zip";
|
||||||
file = "forgejo-backup";
|
file = "forgejo-backup";
|
||||||
enable = true;
|
enable = true;
|
||||||
|
backupDir = backupPath;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
|
|
@ -101,6 +108,9 @@ in
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
|
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
|
||||||
"Z ${service.sops.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 = [
|
users.users.${service.name}.extraGroups = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue