mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-09 09:21:04 +00:00
Use b2 for backups
This commit is contained in:
parent
f5ec301441
commit
b79acbaf6a
|
@ -4,13 +4,14 @@ let
|
|||
in
|
||||
{
|
||||
services.restic.backups = {
|
||||
options = {
|
||||
passwordFile = "/etc/restic/resticPasswd";
|
||||
repository = "s3:s3.anazonaws.com/${cfg.backblaze.bucket}";
|
||||
varBackup = {
|
||||
passwordFile = "/var/lib/restic/pass";
|
||||
repository = "rclone:backblaze:${cfg.backblaze.bucket}:/sfbackup";
|
||||
extraOptions = [ "rclone.args='serve restic --stdio'" ];
|
||||
rcloneConfigFile = "/root/.config/rclone/rclone.conf";
|
||||
initialize = true;
|
||||
paths = [
|
||||
"/var/dkim"
|
||||
"/var/vmail"
|
||||
"/var"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = [ "daily" ];
|
||||
|
@ -25,11 +26,4 @@ in
|
|||
isNormalUser = false;
|
||||
isSystemUser = true;
|
||||
};
|
||||
environment.etc."restic/resticPasswd".text = ''
|
||||
${cfg.resticPassword}
|
||||
'';
|
||||
environment.etc."restic/s3Passwd".text = ''
|
||||
AWS_ACCESS_KEY_ID=${cfg.backblaze.accountId}
|
||||
AWS_SECRET_ACCESS_KEY=${cfg.backblaze.accountKey}
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue