bigbird: Add restic rest server
This commit is contained in:
parent
318e37e164
commit
f937a9b31f
2 changed files with 30 additions and 1 deletions
28
bigbird/backups.nix
Normal file
28
bigbird/backups.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services.restic.server = {
|
||||||
|
enable = true;
|
||||||
|
prometheus = true;
|
||||||
|
privateRepos = true;
|
||||||
|
dataDir = "/nas/chandler/backups/restic";
|
||||||
|
appendOnly = true;
|
||||||
|
extraFlags = [
|
||||||
|
"--prometheus-no-auth"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.restic.backups = {
|
||||||
|
remotebackup = {
|
||||||
|
initialize = true;
|
||||||
|
environmentFile = "/etc/secrets/restic_env";
|
||||||
|
passwordFile = "/etc/secrets/restic_pass";
|
||||||
|
paths = [
|
||||||
|
"/"
|
||||||
|
];
|
||||||
|
repository = "rest:http://bigbird:8000/bert/"; #"b2:chandlerswift-bert-backup/";
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 7"
|
||||||
|
"--keep-weekly 5"
|
||||||
|
"--keep-monthly 12"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
# <nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
|
# <nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./backups.nix
|
||||||
./kathe.nix
|
./kathe.nix
|
||||||
./smb.nix
|
./smb.nix
|
||||||
];
|
];
|
||||||
|
|
@ -49,7 +50,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
networking.firewall.allowedTCPPorts = [ 8000 ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue