fix(restic): switch to fd to include empty paths

This commit is contained in:
Felix Schröter 2022-05-15 19:37:53 +02:00
parent d979a126ab
commit de264cde5a
Signed by: felschr
GPG key ID: 671E39E6744C807D
3 changed files with 4 additions and 2 deletions

View file

@ -33,6 +33,7 @@ in {
"/home/felschr/media" "/home/felschr/media"
"/home/felschr/sync" "/home/felschr/sync"
"/home/felschr/keybase" "/home/felschr/keybase"
"**/.git"
]; ];
timerConfig.OnCalendar = "0/4:00:00"; timerConfig.OnCalendar = "0/4:00:00";
extraPruneOpts = [ "--keep-last 6" ]; extraPruneOpts = [ "--keep-last 6" ];

View file

@ -32,10 +32,10 @@ in {
ignoreFile = builtins.toFile "ignore" ignoreFile = builtins.toFile "ignore"
(foldl (a: b: a + "\n" + b) "" ignorePatterns); (foldl (a: b: a + "\n" + b) "" ignorePatterns);
in '' in ''
${pkgs.ripgrep}/bin/rg \ ${pkgs.fd}/bin/fd \
--hidden \ --hidden \
--files ${files} \
--ignore-file ${ignoreFile} \ --ignore-file ${ignoreFile} \
. ${files} \
| sed "s/\[/\\\[/" | sed "s/\]/\\\]/" | sed "s/\[/\\\[/" | sed "s/\]/\\\]/"
'' ''
else else

View file

@ -26,6 +26,7 @@ in {
"/home/*/.local/share/Trash" "/home/*/.local/share/Trash"
"/home/*/.cache" "/home/*/.cache"
"/var/lib/jellyfin/transcodes" "/var/lib/jellyfin/transcodes"
"**/.git"
]; ];
timerConfig.OnCalendar = "0/4:00:00"; timerConfig.OnCalendar = "0/4:00:00";
extraPruneOpts = [ "--keep-last 6" ]; extraPruneOpts = [ "--keep-last 6" ];