sets up restic on dnsc-server
This commit is contained in:
parent
3b2db23c98
commit
909db2cd31
4 changed files with 29 additions and 5 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
|
|
@ -27,6 +28,12 @@
|
|||
boot.zfs.forceImportRoot = false;
|
||||
boot.zfs.extraPools = [ "main" ];
|
||||
|
||||
# Secrets
|
||||
age = {
|
||||
identityPaths = [ "${config.users.users.dennis.home}/.ssh/id_ed25519" ];
|
||||
secrets."restic/password".file = ../../secrets/restic/password.age;
|
||||
};
|
||||
|
||||
# Nix Settings
|
||||
# Perform garbage collection weekly to maintain low disk usage
|
||||
nix.gc = {
|
||||
|
|
@ -167,6 +174,22 @@
|
|||
# Tailscale
|
||||
services.tailscale.enable = true;
|
||||
|
||||
# Backups
|
||||
services.restic.backups = {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets."restic/password".path;
|
||||
repository = "sftp:dnsc-storage:restic";
|
||||
paths = [
|
||||
"/home/dennis/notes"
|
||||
"/main/share"
|
||||
];
|
||||
timerConfig = {
|
||||
onCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
};
|
||||
|
||||
# Environment variables
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue