2023-04-30 19:24:18 +02:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.restic.server = {
|
|
|
|
enable = true;
|
|
|
|
privateRepos = true;
|
|
|
|
dataDir = "/mnt/backup-4/magenta";
|
|
|
|
listenAddress = "[::1]:43242";
|
|
|
|
};
|
|
|
|
|
2023-05-01 15:34:43 +02:00
|
|
|
# restic rest server does not support --htpasswd-file in the current version of nixpkgs
|
|
|
|
# until then we copy the secrets to the common location
|
2024-05-04 14:43:33 +02:00
|
|
|
sops.secrets.restic-server-magenta-htpasswd = {
|
2023-05-16 09:28:44 +02:00
|
|
|
path = "/mnt/backup-4/magenta/.htpasswd";
|
2023-05-01 15:34:43 +02:00
|
|
|
owner = "restic";
|
|
|
|
group = "restic";
|
|
|
|
};
|
|
|
|
|
2023-04-30 19:24:18 +02:00
|
|
|
services.nginx.virtualHosts."magenta.backup.clerie.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://[::1]:43242/";
|
|
|
|
extraConfig = ''
|
|
|
|
client_max_body_size 10G;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|