mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-10 09:49:29 +00:00
Use b2 for backups
This commit is contained in:
parent
f5ec301441
commit
b79acbaf6a
|
@ -4,13 +4,14 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.restic.backups = {
|
services.restic.backups = {
|
||||||
options = {
|
varBackup = {
|
||||||
passwordFile = "/etc/restic/resticPasswd";
|
passwordFile = "/var/lib/restic/pass";
|
||||||
repository = "s3:s3.anazonaws.com/${cfg.backblaze.bucket}";
|
repository = "rclone:backblaze:${cfg.backblaze.bucket}:/sfbackup";
|
||||||
|
extraOptions = [ "rclone.args='serve restic --stdio'" ];
|
||||||
|
rcloneConfigFile = "/root/.config/rclone/rclone.conf";
|
||||||
initialize = true;
|
initialize = true;
|
||||||
paths = [
|
paths = [
|
||||||
"/var/dkim"
|
"/var"
|
||||||
"/var/vmail"
|
|
||||||
];
|
];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = [ "daily" ];
|
OnCalendar = [ "daily" ];
|
||||||
|
@ -25,11 +26,4 @@ in
|
||||||
isNormalUser = false;
|
isNormalUser = false;
|
||||||
isSystemUser = true;
|
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