aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/ba
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/ba/backup/env.vars1
-rw-r--r--modules/by-name/ba/backup/module.nix27
2 files changed, 11 insertions, 17 deletions
diff --git a/modules/by-name/ba/backup/env.vars b/modules/by-name/ba/backup/env.vars
new file mode 100644
index 00000000..339c5a5b
--- /dev/null
+++ b/modules/by-name/ba/backup/env.vars
@@ -0,0 +1 @@
+RESTIC_COMPRESSION=max
diff --git a/modules/by-name/ba/backup/module.nix b/modules/by-name/ba/backup/module.nix
index eab1281b..031445cf 100644
--- a/modules/by-name/ba/backup/module.nix
+++ b/modules/by-name/ba/backup/module.nix
@@ -173,20 +173,17 @@ in {
extraBackupArgs = [
# Don't scan the filesystem to determine an estimate.
"--no-scan"
- ];
- defaultExtraOptions = [
- "--compression=max"
"--verbose=2"
];
+ environmentFile = "${./env.vars}";
in {
local = lib.mkIf cfg.local.enable {
inhibitsSleep = true;
initialize = true;
- inherit paths exclude extraBackupArgs;
+ inherit paths exclude extraBackupArgs environmentFile;
passwordFile = config.age.secrets.resticLocalRepositoryPassword.path;
- extraOptions = defaultExtraOptions;
repository = "${cfg.local.backupMountPoint}/restic-backup-data/";
@@ -198,14 +195,12 @@ in {
inhibitsSleep = true;
initialize = true;
- inherit paths exclude extraBackupArgs;
+ inherit paths exclude extraBackupArgs environmentFile;
passwordFile = config.age.secrets.resticStorageboxRepositoryPassword.path;
- extraOptions =
- defaultExtraOptions
- ++ [
- "rclone.program='ssh -p 23 ${cfg.storagebox.user}@${cfg.storagebox.user}.your-storagebox.de -i ${config.age.secrets.resticStorageboxSshKey.path} command_forced_on_remote'"
- ];
+ extraOptions = [
+ "rclone.program='ssh -p 23 ${cfg.storagebox.user}@${cfg.storagebox.user}.your-storagebox.de -i ${config.age.secrets.resticStorageboxSshKey.path} command_forced_on_remote'"
+ ];
# This setting is normally passed to rclone, but we force
# the command on the remote.
@@ -227,14 +222,12 @@ in {
# Don't create the repository if it doesn't exist yet.
initialize = false;
- inherit paths exclude extraBackupArgs;
+ inherit paths exclude extraBackupArgs environmentFile;
passwordFile = config.age.secrets.resticStorageboxRepositoryPassword.path;
- extraOptions =
- defaultExtraOptions
- ++ [
- "rclone.program='ssh -p 23 ${cfg.storagebox.user}@${cfg.storagebox.user}.your-storagebox.de command_forced_on_remote'"
- ];
+ extraOptions = [
+ "rclone.program='ssh -p 23 ${cfg.storagebox.user}@${cfg.storagebox.user}.your-storagebox.de command_forced_on_remote'"
+ ];
# This setting is normally passed to rclone, but we force
# the command on the remote.