migrates dnsc-server
This commit is contained in:
parent
ac4074245c
commit
996dc27419
15 changed files with 318 additions and 9 deletions
40
modules/restic/default.nix
Normal file
40
modules/restic/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.nixos.restic =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
# Root SSH for storage box
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
Host dnsc-storage
|
||||
AddKeysToAgent yes
|
||||
Hostname u295965.your-storagebox.de
|
||||
User u295965
|
||||
IdentityFile /root/.ssh/id_ed25519
|
||||
IdentitiesOnly yes
|
||||
Port 23
|
||||
'';
|
||||
};
|
||||
|
||||
services.restic.backups = {
|
||||
"dnsc-storage" = {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets."restic/password".path;
|
||||
repository = "sftp:dnsc-storage:restic/dnsc-server";
|
||||
createWrapper = true;
|
||||
paths = [
|
||||
"/main/share"
|
||||
"/data/actual-server"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-last 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue