mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
feat: added syncthing
This commit is contained in:
parent
5da8744578
commit
5a5f7ed62d
4 changed files with 34 additions and 31 deletions
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue