added syncthing backups.
This commit is contained in:
parent
97238bddbd
commit
811dfa165e
|
@ -123,8 +123,6 @@
|
|||
sshUser = "root";
|
||||
};
|
||||
|
||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
|
||||
packages.x86_64-linux = {
|
||||
proxmox = import ./packages/proxmox.nix {inherit inputs configLib;};
|
||||
iso = import ./packages/iso.nix {inherit inputs configLib;};
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
imports = [
|
||||
../../configs/nixos/nginx.nix
|
||||
];
|
||||
services.nginx.clientMaxBodySize="100m";
|
||||
services.nginx.virtualHosts = {
|
||||
"gabevenberg.com" = {
|
||||
enableACME = true;
|
||||
|
|
|
@ -27,8 +27,33 @@ in {
|
|||
path = "/backup/restic/.htpasswd";
|
||||
owner="restic";
|
||||
};
|
||||
secrets.restic-url = {
|
||||
sopsFile = "${inputs.nix-secrets}/restic-client.yaml";
|
||||
owner = config.host.user;
|
||||
};
|
||||
secrets.restic-password = {
|
||||
sopsFile = "${inputs.nix-secrets}/restic-client.yaml";
|
||||
owner = config.host.user;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
restic
|
||||
];
|
||||
|
||||
services.restic.backups = lib.mkIf (inputs ? nix-secrets) {
|
||||
remote = {
|
||||
repositoryFile = config.sops.secrets.restic-url.path;
|
||||
passwordFile = config.sops.secrets.restic-password.path;
|
||||
initialize = true;
|
||||
paths = [
|
||||
"/storage/syncthing"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "4h";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue