nixos-config/hosts/nuc/modules/caddy/default.nix

25 lines
521 B
Nix
Raw Permalink Normal View History

2024-05-21 18:44:04 +02:00
{ config, ... }:
{
services.caddy = {
enable = true;
email = "ca@${config.networking.domain}";
logFormat = "format console";
2024-05-31 14:51:58 +02:00
globalConfig = ''
servers {
metrics
}
'';
2024-06-06 20:50:33 +02:00
virtualHosts.":2018" = {
extraConfig = ''
metrics
'';
logFormat = ''
output discard
'';
};
2024-05-21 18:44:04 +02:00
};
2024-05-23 15:44:49 +02:00
systemd.services.caddy.environment.XDG_DATA_HOME = "/var/lib";
2024-05-21 18:44:04 +02:00
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 443 ];
}