tsuki: init restic backup

This commit is contained in:
notohh 2023-06-02 23:30:30 -04:00
parent 84a65249e5
commit f42e54db80
Signed by: notohh
GPG key ID: BD47506D475EE86D
4 changed files with 50 additions and 1 deletions

View file

@ -5,6 +5,7 @@
}: {
imports = [
./hardware-configuration.nix
./services
../../home/wayland
../../modules
../../modules/fonts.nix

View file

@ -21,7 +21,7 @@
username = "notoh";
homeDirectory = "/home/notoh";
packages = with pkgs; [
webcord
discord
spotify-player
obs-studio
pavucontrol

View file

@ -0,0 +1,5 @@
{...}: {
imports = [
./restic.nix
];
}

View file

@ -0,0 +1,43 @@
{
pkgs,
config,
...
}: {
sops.secrets.restic-repo-pwd = {};
environment.systemPackages = [pkgs.restic];
services.restic = {
backups = {
tsuki = {
paths = [
"/home"
];
exclude = [
"/home/*/Downloads"
"/home/*/Games"
"/home/*/Videos"
"/home/*/cryptomator"
"/home/*/.cache"
"/home/*/.wine"
"/home/*/.rustup"
"/home/*/.cargo"
"/home/*/.local/share/Trash"
"/home/*/.local/share/Steam"
"/home/*/.local/share/.var"
"*.qcow2"
"*.iso"
];
pruneOpts = [
"--keep-daily=5"
"--keep-weekly=3"
"--keep-monthly=2"
];
initialize = true;
repository = "/nas/home";
passwordFile = config.sops.secrets.restic-repo-pwd.path;
timerConfig = {
OnCalendar = "daily";
};
};
};
};
}