mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-26 02:26:33 +00:00
30 lines
658 B
Nix
30 lines
658 B
Nix
{ config, pkgs, ... }:
|
|
let
|
|
cfg = config.services.userdata;
|
|
in
|
|
{
|
|
services.restic.backups = {
|
|
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"
|
|
];
|
|
timerConfig = {
|
|
OnCalendar = [ "daily" ];
|
|
};
|
|
user = "restic";
|
|
pruneOpts = [
|
|
"--keep-daily 5"
|
|
];
|
|
};
|
|
};
|
|
users.users.restic = {
|
|
isNormalUser = false;
|
|
isSystemUser = true;
|
|
};
|
|
}
|