fix: have restic be a system service

This commit is contained in:
etwas 2025-12-08 15:15:03 +01:00
parent 1abf59fb4c
commit 1080e5166b
4 changed files with 16 additions and 15 deletions

View file

@ -1,5 +1,4 @@
{
config,
pkgs,
inputs,
spicetify-nix,
@ -48,11 +47,6 @@
./misc_pkgs
./wm
];
services.restic.backups.localbackup = {
passwordFile = config.age.secrets.restic-password.path;
environmentFile = config.age.secrets.restic-s3-key.path;
};
};
};

View file

@ -2,7 +2,6 @@
imports = [
./git.nix
./keyring.nix
./restic.nix
./ssh.nix
./zsh.nix
];

View file

@ -3,6 +3,7 @@
./auth.nix
./docker.nix
./printing.nix
./restic.nix
./wm.nix
];
}

View file

@ -1,29 +1,36 @@
{ ... }:
{ config, ... }:
{
services.restic = {
enable = true;
backups = {
localbackup = {
passwordFile = config.age.secrets.restic-password.path;
environmentFile = config.age.secrets.restic-s3-key.path;
exclude = [
"/home/$USER/.cache"
"/home/$USER/.local/share/libvirt"
"/home/$USER/.local/share/Steam"
"/home/$USER/.local/share/Trash"
"/home/$USER/Android"
"home/*/.local/share/libvirt"
"home/*/.local/share/Steam"
"home/*/.local/share/Trash"
"home/*/Android"
".cache"
".mozilla"
".venv"
"venv"
".direnv"
".git"
];
initialize = true;
paths = [
"/home"
];
extraBackupArgs = [
"--one-file-system"
];
repository = "s3:https://s3.filmsli.de/restic-framework";
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"