From a15a0d21e3cf147586bd5bc38fbc6c90aa782de2 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 8 Oct 2024 21:31:33 -0500 Subject: [PATCH] borgmatic: force archive name format Signed-off-by: Myned --- options/custom/services/borgmatic.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/options/custom/services/borgmatic.nix b/options/custom/services/borgmatic.nix index b3f8986..8c5260c 100644 --- a/options/custom/services/borgmatic.nix +++ b/options/custom/services/borgmatic.nix @@ -28,6 +28,7 @@ in { # https://torsion.org/borgmatic/docs/reference/configuration/ settings = { + archive_name_format = "{now:%Y-%m-%d %H:%M:%S}"; # Remove hostname keep_daily = 7; keep_weekly = 4; keep_monthly = 1; @@ -36,9 +37,7 @@ in { retry_wait = 60; # Additive seconds per retry compression = "auto,zstd"; # Use heuristics to decide whether to compress with zstd ssh_command = "ssh -i /etc/ssh/id_ed25519"; # !! Imperative key generation - encryption_passcommand = "${cat} ${ - config.age.secrets."${config.custom.profile}/borgmatic/borgbase.${config.custom.hostname}".path - }"; + encryption_passcommand = "${cat} ${config.age.secrets."${config.custom.profile}/borgmatic/borgbase".path}"; repositories = cfg.repositories; source_directories = cfg.sources; @@ -67,7 +66,7 @@ in { age.secrets = let secret = filename: {file = "${inputs.self}/secrets/${filename}";}; in { - "${config.custom.profile}/borgmatic/borgbase.${config.custom.hostname}" = secret "${config.custom.profile}/borgmatic/borgbase.${config.custom.hostname}"; + "${config.custom.profile}/borgmatic/borgbase" = secret "${config.custom.profile}/borgmatic/borgbase"; }; }; }