Compare commits

...

2 Commits

Author SHA1 Message Date
vegardbm bfd83c4c64 uptime-kuma: wants to use /var/lib/private for state
Build topology graph / evals (push) Successful in 2m32s
Eval nix flake / evals (push) Successful in 3m49s
2026-05-22 17:58:00 +02:00
oysteikt 9a6fdecb03 kommode/gitea/dump: only keep a single dump at a time
Eval nix flake / evals (push) Successful in 3m54s
Build topology graph / evals (push) Successful in 3m59s
2026-05-22 18:27:57 +09:00
2 changed files with 5 additions and 10 deletions
@@ -19,7 +19,7 @@ in {
locations."/".proxyPass = "http://${cfg.settings.HOST}:${cfg.settings.PORT}";
};
fileSystems."/var/lib/uptime-kuma" = {
fileSystems."/var/lib/private/uptime-kuma" = {
device = stateDir;
fsType = "bind";
options = [ "bind" ];
+4 -9
View File
@@ -228,14 +228,9 @@ in {
};
in lib.mkForce "${lib.getExe cfg.package} dump ${args}";
# Only keep n backup files at a time
postStop = let
cu = prog: "'${lib.getExe' pkgs.coreutils prog}'";
backupCount = 3;
in ''
for file in $(${cu "ls"} -t1 '${cfg.dump.backupDir}' | ${cu "sort"} --reverse | ${cu "tail"} -n+${toString (backupCount + 1)}); do
${cu "rm"} "$file"
done
'';
# Only keep a single backup file at a time.
postStop = ''
${lib.getExe' pkgs.coreutils "mv"} '${cfg.dump.backupDir}'/gitea-dump-*.tar.gz gitea-dump.tar.gz
'';
};
}