diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2022-01-20 20:11:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 20:11:51 +0100 |
commit | fde7c9d409cf012d53d065364532793c93191dcb (patch) | |
tree | e9b2932889de947f2b1d97bd2c6fa9f347200229 /nixos | |
parent | 6bbd192555679f4ea70cf1e340c5fdb798eaa515 (diff) | |
parent | fa233bca31fa1bfba16cd91ddd8736bb63cc3e59 (diff) | |
download | nixpkgs-fde7c9d409cf012d53d065364532793c93191dcb.tar nixpkgs-fde7c9d409cf012d53d065364532793c93191dcb.tar.gz nixpkgs-fde7c9d409cf012d53d065364532793c93191dcb.tar.bz2 nixpkgs-fde7c9d409cf012d53d065364532793c93191dcb.tar.lz nixpkgs-fde7c9d409cf012d53d065364532793c93191dcb.tar.xz nixpkgs-fde7c9d409cf012d53d065364532793c93191dcb.tar.zst nixpkgs-fde7c9d409cf012d53d065364532793c93191dcb.zip |
Merge pull request #155499 from bachp/gitea-dump-file
nixos/gitea: allow specifying dump format and name
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/gitea.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index 0096286701f..bc7bb663ee0 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -177,6 +177,19 @@ in defaultText = literalExpression ''"''${config.${opt.stateDir}}/dump"''; description = "Path to the dump files."; }; + + type = mkOption { + type = types.enum [ "zip" "rar" "tar" "sz" "tar.gz" "tar.xz" "tar.bz2" "tar.br" "tar.lz4" ]; + default = "zip"; + description = "Archive format used to store the dump file."; + }; + + file = mkOption { + type = types.nullOr types.str; + default = null; + description = "Filename to be used for the dump. If `null` a default name is choosen by gitea."; + example = "gitea-dump"; + }; }; ssh = { @@ -634,7 +647,7 @@ in serviceConfig = { Type = "oneshot"; User = cfg.user; - ExecStart = "${gitea}/bin/gitea dump"; + ExecStart = "${gitea}/bin/gitea dump --type ${cfg.dump.type}" + optionalString (cfg.dump.file != null) " --file ${cfg.dump.file}"; WorkingDirectory = cfg.dump.backupDir; }; }; |