summaryrefslogtreecommitdiff
path: root/common/network.nix
blob: c1d6edac6f902d8fa80feb0ef5655a34d4bc2eef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{config, ...}: let
  customDomain = config.customOps.domain.fqdn;
  hostname = config.networking.hostName;
in {
  networking = {
    enableIPv6 = true;
    firewall = {
      logRefusedPackets = true;
      allowedTCPPorts = [80 443];
    };
  };

  services.nginx.virtualHosts."${hostname}.${customDomain}" = {
    default = true;
    locations."/".return = 204;
    forceSSL = true;
    enableACME = true;
  };
}