From 0cfbc4708de1261347d9d659f7d3c350ace7b3f8 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 27 Sep 2024 16:59:57 +0200 Subject: [PATCH] gitea: Add tmpfiles configuration to clean up forgejo dumps --- machines/gitea/forgejo/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/machines/gitea/forgejo/default.nix b/machines/gitea/forgejo/default.nix index e4450ce..c686e84 100644 --- a/machines/gitea/forgejo/default.nix +++ b/machines/gitea/forgejo/default.nix @@ -89,6 +89,20 @@ in }; }; + # Clean up dump files older than 60 days + systemd.tmpfiles.settings = { + forgejo = { + "/var/lib/forgejo/dump" = { + d = { + user = "git"; + group = "forgejo"; + mode = "0750"; + age = "60d"; + }; + }; + }; + }; + networking.firewall.allowedTCPPorts = [ 3000 ]; users.users.git = {