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

20 lines
446 B
Nix
Raw 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
}
'';
virtualHosts.":2018".extraConfig = ''
metrics
'';
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 ];
}