fix: have restic be a system service
This commit is contained in:
parent
1abf59fb4c
commit
1080e5166b
4 changed files with 16 additions and 15 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
spicetify-nix,
|
spicetify-nix,
|
||||||
|
|
@ -48,11 +47,6 @@
|
||||||
./misc_pkgs
|
./misc_pkgs
|
||||||
./wm
|
./wm
|
||||||
];
|
];
|
||||||
|
|
||||||
services.restic.backups.localbackup = {
|
|
||||||
passwordFile = config.age.secrets.restic-password.path;
|
|
||||||
environmentFile = config.age.secrets.restic-s3-key.path;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./git.nix
|
./git.nix
|
||||||
./keyring.nix
|
./keyring.nix
|
||||||
./restic.nix
|
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
./auth.nix
|
./auth.nix
|
||||||
./docker.nix
|
./docker.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
|
./restic.nix
|
||||||
./wm.nix
|
./wm.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,36 @@
|
||||||
{ ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.restic = {
|
services.restic = {
|
||||||
enable = true;
|
|
||||||
|
|
||||||
backups = {
|
backups = {
|
||||||
localbackup = {
|
localbackup = {
|
||||||
|
passwordFile = config.age.secrets.restic-password.path;
|
||||||
|
environmentFile = config.age.secrets.restic-s3-key.path;
|
||||||
|
|
||||||
exclude = [
|
exclude = [
|
||||||
"/home/$USER/.cache"
|
"home/*/.local/share/libvirt"
|
||||||
"/home/$USER/.local/share/libvirt"
|
"home/*/.local/share/Steam"
|
||||||
"/home/$USER/.local/share/Steam"
|
"home/*/.local/share/Trash"
|
||||||
"/home/$USER/.local/share/Trash"
|
"home/*/Android"
|
||||||
"/home/$USER/Android"
|
".cache"
|
||||||
|
".mozilla"
|
||||||
".venv"
|
".venv"
|
||||||
"venv"
|
"venv"
|
||||||
".direnv"
|
".direnv"
|
||||||
".git"
|
".git"
|
||||||
];
|
];
|
||||||
|
|
||||||
initialize = true;
|
initialize = true;
|
||||||
|
|
||||||
paths = [
|
paths = [
|
||||||
"/home"
|
"/home"
|
||||||
];
|
];
|
||||||
|
|
||||||
extraBackupArgs = [
|
extraBackupArgs = [
|
||||||
"--one-file-system"
|
"--one-file-system"
|
||||||
];
|
];
|
||||||
|
|
||||||
repository = "s3:https://s3.filmsli.de/restic-framework";
|
repository = "s3:https://s3.filmsli.de/restic-framework";
|
||||||
|
|
||||||
pruneOpts = [
|
pruneOpts = [
|
||||||
"--keep-daily 7"
|
"--keep-daily 7"
|
||||||
"--keep-weekly 4"
|
"--keep-weekly 4"
|
||||||
Loading…
Reference in a new issue