From e36358aff7c028d12d7d66e9dbd4a2a7ae2bd851 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 10 Oct 2025 01:22:13 -0500 Subject: [PATCH] feat: added syncthing --- modules/nixos/services/forgejo/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/nixos/services/forgejo/default.nix b/modules/nixos/services/forgejo/default.nix index 844af16..4373f8f 100755 --- a/modules/nixos/services/forgejo/default.nix +++ b/modules/nixos/services/forgejo/default.nix @@ -106,10 +106,16 @@ in ]; }; - systemd.services.forgejo-dump = { - serviceConfig = { - ExecStartPost = "${pkgs.nushell}/bin/nu -c 'ls ${backupPath} | where name =~ forgejo-backup and modified < ((date now) - 7day) | each { rm $in.name }'"; + systemd.services = { + forgejo-dump = { + serviceConfig = { + ExecStartPost = "${pkgs.nushell}/bin/nu -c 'ls ${backupPath} | where name =~ forgejo-backup and modified < ((date now) - 7day) | each { rm $in.name }'"; + }; }; + forgejo.serviceConfig.ExecStartPre = [ + "+${pkgs.coreutils}/bin/chgrp ${syncthing.name} ${backupPath}" + "+${pkgs.coreutils}/bin/chmod 0750 ${backupPath}" + ]; }; systemd.tmpfiles.rules = [