talos: setup restic backups

This commit is contained in:
Antoine Martin 2024-03-05 05:07:46 +01:00
parent 7be4514da3
commit cd715f1a03
5 changed files with 54 additions and 2 deletions

View file

@ -75,6 +75,49 @@
};
pipewire.enable = true;
restic-backup = {
enable = true;
repo = "b2:talos-backup";
passwordFile = config.age.secrets."restic-backup/talos-password".path;
environmentFile = config.age.secrets."restic-backup/talos-credentials".path;
timerConfig = {
OnCalendar = "*-*-* 13:00:00"; # laptop only gets used during the day
};
paths = [
"/home/alarsyo"
];
exclude = [
"/home/alarsyo/Downloads"
# Rust builds using half my storage capacity
"/home/alarsyo/**/target"
"/home/alarsyo/work/rust/build"
# don't backup nixpkgs
"/home/alarsyo/work/nixpkgs"
"/home/alarsyo/go"
# C build crap
"*.a"
"*.o"
"*.so"
".direnv"
# test vms
"*.qcow2"
# secrets stay offline
"/home/alarsyo/**/secrets"
# ignore all dotfiles as .config and .cache can become quite big
"/home/alarsyo/.*"
];
};
};
my.gui.enable = true;

View file

@ -13,8 +13,8 @@
// attrs;
in
lib.mapAttrs toSecret {
#"restic-backup/hephaestus-credentials" = {};
#"restic-backup/hephaestus-password" = {};
"restic-backup/talos-credentials" = {};
"restic-backup/talos-password" = {};
"users/alarsyo-hashed-password" = {};
"users/root-hashed-password" = {};