From 22c1424552904924619e0868b360a31055a57335 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 18 Jul 2024 20:56:48 +0200 Subject: [PATCH] backups: fix for nixos 24.05 --- modules/backups.nix | 6 ++---- test/tests.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/backups.nix b/modules/backups.nix index a80d66f..7205f03 100644 --- a/modules/backups.nix +++ b/modules/backups.nix @@ -52,7 +52,7 @@ let # Potential backup file paths are matched against filelist # entries from top to bottom. # The first match determines inclusion or exclusion. - filelist = builtins.toFile "filelist.txt" '' + includeFileList = builtins.toFile "filelist.txt" '' ${builtins.concatStringsSep "\n" cfg.extraFiles} ${optionalString (!cfg.with-bulk-data) '' @@ -95,9 +95,7 @@ in { services.duplicity = { enable = true; - extraFlags = [ - "--include-filelist" "${filelist}" - ]; + inherit includeFileList; fullIfOlderThan = mkDefault "1M"; targetUrl = cfg.destination; frequency = cfg.frequency; diff --git a/test/tests.py b/test/tests.py index ef38b9d..67cdce4 100644 --- a/test/tests.py +++ b/test/tests.py @@ -355,7 +355,7 @@ def _(): # Files in backup and /var/lib should be identical assert_matches( f"{run_duplicity} verify --archive-dir /var/lib/duplicity file:///var/lib/localBackups /var/lib", - "0 differences found", + "no sync needed", ) # Backup should include important files files = {