Torjus Håkestad 7f84780956
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Enable metrics endpoint for caddy on nix-cache
2025-06-01 02:32:22 +02:00

30 lines
549 B
Nix

{ pkgs, ... }:
{
services.caddy = {
enable = true;
package = pkgs.unstable.caddy;
configFile = pkgs.writeText "Caddyfile" ''
{
acme_ca https://ca.home.2rjus.net/acme/acme/directory
metrics {
per_host
}
}
http://nix-cache.home.2rjus.net/metrics {
metrics
}
nix-cache.home.2rjus.net {
log {
output file /var/log/caddy/nix-cache.log {
mode 644
}
}
reverse_proxy http://localhost:5000
}
'';
};
}