mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 21:33:11 +01:00
20 lines
446 B
Nix
20 lines
446 B
Nix
{ config, ... }:
|
|
{
|
|
services.caddy = {
|
|
enable = true;
|
|
email = "ca@${config.networking.domain}";
|
|
logFormat = "format console";
|
|
globalConfig = ''
|
|
servers {
|
|
metrics
|
|
}
|
|
'';
|
|
virtualHosts.":2018".extraConfig = ''
|
|
metrics
|
|
'';
|
|
};
|
|
systemd.services.caddy.environment.XDG_DATA_HOME = "/var/lib";
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
networking.firewall.allowedUDPPorts = [ 443 ];
|
|
}
|