diff options
Diffstat (limited to 'modules/by-name')
| -rw-r--r-- | modules/by-name/ba/backup/env.vars | 1 | ||||
| -rw-r--r-- | modules/by-name/ba/backup/module.nix | 27 | ||||
| -rw-r--r-- | modules/by-name/ni/nix/module.nix | 3 |
3 files changed, 14 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. diff --git a/modules/by-name/ni/nix/module.nix b/modules/by-name/ni/nix/module.nix index 65b6ed5c..7caa8a8e 100644 --- a/modules/by-name/ni/nix/module.nix +++ b/modules/by-name/ni/nix/module.nix @@ -59,6 +59,9 @@ in { }; settings = { + # Don't warn about dirty git trees (It is usually absolutely useless) + warn-dirty = false; + auto-optimise-store = true; experimental-features = [ "nix-command" |
