From 5d80ed9d80b551327d75f8738f77363cb94e2b9f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 18 Feb 2022 12:08:01 +0100 Subject: vidhar: ... --- hosts/vidhar/borg/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'hosts/vidhar/borg/default.nix') diff --git a/hosts/vidhar/borg/default.nix b/hosts/vidhar/borg/default.nix index 7a508971..3804aa76 100644 --- a/hosts/vidhar/borg/default.nix +++ b/hosts/vidhar/borg/default.nix @@ -11,7 +11,7 @@ let Host yggdrasil.borgbase HostName nx69hpl8.repo.borgbase.com User nx69hpl8 - IdentityFile /run/credentials/${serviceName}.service/ssh-identity + IdentityFile ${config.sops.secrets."append.borgbase".path} IdentitiesOnly yes BatchMode yes @@ -33,14 +33,10 @@ let "BORG_CACHE_DIR=/var/lib/borg/cache" "BORG_SECURITY_DIR=/var/lib/borg/security" "BORG_KEYS_DIR=/var/lib/borg/keys" - "BORG_KEY_FILE=/run/credentials/${serviceName}.service/keyfile" + "BORG_KEY_FILE=${config.sops.secrets."yggdrasil.borgkey".path}" "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes" "BORG_HOSTNAME_IS_UNIQUE=yes" ]; - LoadCredential = [ - "ssh-identity:${config.sops.secrets."append.borgbase".path}" - "keyfile:${config.sops.secrets."yggdrasil.borgkey".path}" - ]; }; }; @@ -102,10 +98,16 @@ in { sops.secrets."append.borgbase" = { format = "binary"; sopsFile = ./append.borgbase; + owner = "borg"; + group = "borg"; + mode = "0640"; }; sops.secrets."yggdrasil.borgkey" = { format = "binary"; sopsFile = ./yggdrasil.borgkey; + owner = "borg"; + group = "borg"; + mode = "0640"; }; systemd.services = listToAttrs (map copyService [{ repo = "/srv/backup/borg/jotnar"; repoEscaped = "srv-backup-borg-jotnar"; }]); -- cgit v1.2.3