1
0
Fork 0

attic: nginx+attic cli

This commit is contained in:
Daniel Kempkens 2023-04-04 22:30:12 +02:00
parent 75af9cd046
commit 51c1ce5812
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -1,6 +1,11 @@
{ config, secret, ... }:
{ pkgs, config, secret, ... }:
let
fqdn = "attic.cache.daniel.sx";
in
{
environment.systemPackages = [ pkgs.attic ];
services.atticd = {
enable = true;
@ -9,6 +14,9 @@
settings = {
listen = "127.0.0.1:8080";
allowed-hosts = [ "${fqdn}" ];
api-endpoint = "https://${fqdn}/";
storage = {
type = "s3";
region = "eu-central-1";
@ -29,4 +37,17 @@
};
};
};
services.nginx.virtualHosts."${fqdn}" = {
quic = true;
http3 = true;
onlySSL = true;
useACMEHost = "cache.daniel.sx";
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://127.0.0.1:8080";
};
};
}