🔧 borgbackup for paperless

This commit is contained in:
Ingolf Wagner 2024-10-06 18:15:45 +09:00
parent 07a2b5f2d1
commit 90f61ebec4
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 4 additions and 3 deletions

View file

@ -228,7 +228,7 @@
}
# ssh keys
(
{ config, ... }:
{ config, pkgs, ... }:
{
users.users.root.openssh.authorizedKeys.keyFiles = [
# master key
@ -238,6 +238,7 @@
"${config.clan.core.clanDir}/machines/chungus/facts/ssh.rbackup.id_ed25519.pub"
"${config.clan.core.clanDir}/machines/chungus/facts/ssh.paperless-ngx.id_ed25519.pub"
];
environment.systemPackages = [ pkgs.borgbackup ];
}
)
{

View file

@ -58,11 +58,11 @@
# backup
services.borgbackup.jobs."paperless-ngx" = {
paths = [ config.services.paperless.dataDir ];
repo = "root@orbi.bear:${config.networking.hostName}/paperless-borg-backup";
repo = "root@orbi.bear:borg-${config.networking.hostName}-paperless";
compression = "auto,lzma";
startAt = "daily";
encryption = {
mode = "repokey-blake2";
mode = "keyfile-blake2";
passCommand = "cat ${
toString config.clan.core.facts.services."paperless-ngx.borg".secret."password.borgbackup".path
}";