home backup for dragneel

This commit is contained in:
TheWanderingCrow 2026-02-16 16:48:23 -05:00
parent ce45a37a8c
commit 20d848f249
2 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,39 @@
{
config,
...
}:
{
# Restic secrets
sops.secrets = {
"restic/hetzner-dragneel/url" = { };
"restic/hetzner-dragneel/key" = { };
};
services.restic.backups = {
hetzner-dragneel = {
initialize = true;
user = "root";
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
extraOptions = [
"sftp.args='-i /etc/ssh/ssh_host_ed25519_key -p 23'"
];
repositoryFile = config.sops.secrets."restic/hetzner-handlerone/url".path;
passwordFile = config.sops.secrets."restic/hetzner-handlerone/key".path;
paths = [
"/home/dragneel"
];
exclude = [
"/var/cache"
"/home/*/.cache"
".git"
".nix-profile"
"/nix/*"
".local/share/Steam"
".steam"
];
};
};
}

View file

@ -9,10 +9,12 @@
lib,
pkgs,
...
}: {
}:
{
imports = lib.flatten [
# Hardware
./hardware-configuration.nix # I want to use factor if possible
./backups.nix
# Disks
inputs.disko.nixosModules.disko