diff --git a/modules/system/backups.nix b/modules/system/backups.nix index 7c19761..dd68a81 100644 --- a/modules/system/backups.nix +++ b/modules/system/backups.nix @@ -83,13 +83,12 @@ in "$BORG_REPO::$archive" \ ${lib.concatStringsSep " " bak_paths.paths} else - ## flatten all paths from cfg.baks into one big list - # all_paths="${ - # lib.concatStringsSep " " - # (lib.flatten - # (lib.mapAttrsToList (_: bak: bak.paths) cfg.baks)) - # }" - archive="$timestamp-${config.networking.hostName}" + # flatten all paths from cfg.baks into one big list + all_paths="${ + lib.concatStringsSep " " + (lib.flatten + (lib.mapAttrsToList (_: bak: bak.paths) cfg.baks)) + }" borg create \ --verbose \ --filter AME \ @@ -97,7 +96,7 @@ in --stats \ --show-rc \ --compression lzma,9 \ - "$BORG_REPO::$archive" \ + "$BORG_REPO::$timestamp-${toString config.networking.hostName}" \ $all_paths fi