kommode/gitea: skip some parts in the dumps

This commit is contained in:
2025-09-10 11:27:38 +02:00
parent 1166161858
commit 2e75f31d3e

View File

@@ -194,8 +194,24 @@ in {
networking.firewall.allowedTCPPorts = [ sshPort ];
systemd.services.gitea-dump = {
serviceConfig.ExecStart = let
args = lib.cli.toGNUCommandLineShell { } {
type = cfg.dump.type;
# This should be declarative on nixos, no need to backup.
skip-custom-dir = true;
# This can be regenerated, no need to backup
skip-index = true;
# Logs are stored in the systemd journal
skip-log = true;
};
in lib.mkForce "${lib.getExe cfg.package} ${args}";
# Only keep n backup files at a time
systemd.services.gitea-dump.postStop = let
postStop = let
cu = prog: "'${lib.getExe' pkgs.coreutils prog}'";
backupCount = 3;
in ''
@@ -203,4 +219,5 @@ in {
${cu "rm"} "$file"
done
'';
};
}