mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-02-24 13:12:32 -05:00
home backup for dragneel
This commit is contained in:
parent
ce45a37a8c
commit
20d848f249
2 changed files with 42 additions and 1 deletions
39
hosts/nixos/Dragneel/backups.nix
Normal file
39
hosts/nixos/Dragneel/backups.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue