nixos-servers/services/nix-cache/proxy.nix

22 lines
428 B
Nix
Raw Normal View History

2025-01-24 14:48:03 +00:00
{ pkgs, ... }:
{
services.caddy = {
enable = true;
2025-01-27 23:49:22 +00:00
package = pkgs.unstable.caddy;
2025-01-24 14:48:03 +00:00
configFile = pkgs.writeText "Caddyfile" ''
{
acme_ca https://ca.home.2rjus.net/acme/acme/directory
}
nix-cache.home.2rjus.net {
log {
2025-01-27 23:49:22 +00:00
output file /var/log/caddy/nix-cache.log {
mode 644
}
2025-01-24 14:48:03 +00:00
}
reverse_proxy http://localhost:5000
}
'';
};
}