main
1{
2 flake.modules.nixos."services/caddy" = _: {
3 services.caddy = {
4 enable = true;
5 # Reload Caddy instead of restarting it when configuration file changes.
6 enableReload = true;
7
8 globalConfig = ''
9 http_port 80
10 https_port 443
11 '';
12 };
13
14 networking.firewall.allowedTCPPorts = [80 443];
15 };
16}