drone: add restic rest server

This commit is contained in:
wo2wz 2025-11-22 22:33:43 -05:00
parent 3899927ced
commit 49a5d29b0a
4 changed files with 40 additions and 4 deletions

View file

@ -0,0 +1,28 @@
{ config, ... }:
{
sops.secrets."restic/rest-server/.htpasswd" = {
owner = "restic";
group = "restic";
};
services.caddy.virtualHosts."restic.taild5f7e6.ts.net".extraConfig =
assert config.services.caddy.enable;
''
import default-settings
bind tailscale/restic
reverse_proxy localhost:8001
'';
services.restic.server = {
enable = true;
dataDir = "/mnt/external/backup/restic";
listenAddress = "127.0.0.1:8001";
htpasswd-file = config.sops.secrets."restic/rest-server/.htpasswd".path;
privateRepos = true;
appendOnly = true;
};
}