Unverified Commit 96aa4941 authored by dish's avatar dish Committed by GitHub
Browse files

nixos/forgejo: add age setting to automatic dump (#450761)

parents 2b20f6ad 7bf1b4d0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -127,6 +127,8 @@

- Zig 0.12 has been removed.

- `services.forgejo.dump.age` now defaults to `4w`, which deletes dumps older than 4 weeks. This new behaviour could result in older backups being deleted.

- `ansible-later` has been removed because it was discontinued by the author.

- `k3s` airgap images passthru attributes have changed:
+14 −1
Original line number Diff line number Diff line
@@ -285,6 +285,19 @@ in
          description = "Filename to be used for the dump. If `null` a default name is chosen by forgejo.";
          example = "forgejo-dump";
        };

        age = mkOption {
          type = types.str;
          default = "4w";
          example = "5d";
          description = ''
            Age of backup used to decide what files to delete when cleaning.
            If a file or directory is older than the current time minus the age field, it is deleted.

            The format is described in
            {manpage}`tmpfiles.d(5)`.
          '';
        };
      };

      lfs = {
@@ -596,7 +609,7 @@ in
    };

    systemd.tmpfiles.rules = [
      "d '${cfg.dump.backupDir}' 0750 ${cfg.user} ${cfg.group} - -"
      "d '${cfg.dump.backupDir}' 0750 ${cfg.user} ${cfg.group} ${cfg.dump.age} -"
      "z '${cfg.dump.backupDir}' 0750 ${cfg.user} ${cfg.group} - -"
      "d '${cfg.repositoryRoot}' 0750 ${cfg.user} ${cfg.group} - -"
      "z '${cfg.repositoryRoot}' 0750 ${cfg.user} ${cfg.group} - -"