From d73da1a131b6a64891537a6b2a31149e5be44b4e Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 8 Mar 2021 18:43:48 +0100 Subject: [PATCH] restic/system: Limit upload to 1.5M by default --- modules/restic/system.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/restic/system.nix b/modules/restic/system.nix index d9684b8..2b7844a 100644 --- a/modules/restic/system.nix +++ b/modules/restic/system.nix @@ -57,6 +57,10 @@ in type = lib.types.listOf lib.types.str; default = [ ]; }; + uploadLimit = lib.mkOption { + type = lib.types.nullOr lib.types.int; + default = 1500; + }; }; config = lib.mkIf cfg.enable { @@ -81,7 +85,7 @@ in "--exclude-file=${excludesFile}" "--tag system" "--verbose" - ]; + ] ++ lib.optional (cfg.uploadLimit != null) "--limit-upload=${toString cfg.uploadLimit}"; }; systemd.services."restic-backups-system".serviceConfig = {