mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-05-13 07:41:08 +02:00
25 lines
597 B
Nix
25 lines
597 B
Nix
{ config, caddy-patched, ... }:
|
|
{
|
|
services.caddy = {
|
|
enable = true;
|
|
# package = caddy-patched.packages.x86_64-linux.default;
|
|
email = "ca@${config.networking.domain}";
|
|
logFormat = "format console";
|
|
globalConfig = ''
|
|
servers {
|
|
metrics
|
|
}
|
|
'';
|
|
virtualHosts.":2018" = {
|
|
extraConfig = ''
|
|
metrics
|
|
'';
|
|
logFormat = ''
|
|
output discard
|
|
'';
|
|
};
|
|
};
|
|
systemd.services.caddy.environment.XDG_DATA_HOME = "/var/lib";
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
networking.firewall.allowedUDPPorts = [ 443 ];
|
|
}
|