From de264cde5a8ddee86f734e417058dedcda0370a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Sun, 15 May 2022 19:37:53 +0200 Subject: [PATCH] fix(restic): switch to fd to include empty paths --- services/restic/home-pc.nix | 1 + services/restic/lib.nix | 4 ++-- services/restic/rpi4.nix | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/services/restic/home-pc.nix b/services/restic/home-pc.nix index 7846bfa..7a9ebfe 100644 --- a/services/restic/home-pc.nix +++ b/services/restic/home-pc.nix @@ -33,6 +33,7 @@ in { "/home/felschr/media" "/home/felschr/sync" "/home/felschr/keybase" + "**/.git" ]; timerConfig.OnCalendar = "0/4:00:00"; extraPruneOpts = [ "--keep-last 6" ]; diff --git a/services/restic/lib.nix b/services/restic/lib.nix index 708adfa..10cee79 100644 --- a/services/restic/lib.nix +++ b/services/restic/lib.nix @@ -32,10 +32,10 @@ in { ignoreFile = builtins.toFile "ignore" (foldl (a: b: a + "\n" + b) "" ignorePatterns); in '' - ${pkgs.ripgrep}/bin/rg \ + ${pkgs.fd}/bin/fd \ --hidden \ - --files ${files} \ --ignore-file ${ignoreFile} \ + . ${files} \ | sed "s/\[/\\\[/" | sed "s/\]/\\\]/" '' else diff --git a/services/restic/rpi4.nix b/services/restic/rpi4.nix index b2a76f8..00dfbf6 100644 --- a/services/restic/rpi4.nix +++ b/services/restic/rpi4.nix @@ -26,6 +26,7 @@ in { "/home/*/.local/share/Trash" "/home/*/.cache" "/var/lib/jellyfin/transcodes" + "**/.git" ]; timerConfig.OnCalendar = "0/4:00:00"; extraPruneOpts = [ "--keep-last 6" ];