tsuki: init restic backup
This commit is contained in:
parent
84a65249e5
commit
f42e54db80
4 changed files with 50 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./services
|
||||
../../home/wayland
|
||||
../../modules
|
||||
../../modules/fonts.nix
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
username = "notoh";
|
||||
homeDirectory = "/home/notoh";
|
||||
packages = with pkgs; [
|
||||
webcord
|
||||
discord
|
||||
spotify-player
|
||||
obs-studio
|
||||
pavucontrol
|
||||
|
|
5
hosts/tsuki/services/default.nix
Normal file
5
hosts/tsuki/services/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./restic.nix
|
||||
];
|
||||
}
|
43
hosts/tsuki/services/restic.nix
Normal file
43
hosts/tsuki/services/restic.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue