diff options
Diffstat (limited to 'common/network.nix')
| -rw-r--r-- | common/network.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/common/network.nix b/common/network.nix new file mode 100644 index 0000000..c1d6eda --- /dev/null +++ b/common/network.nix @@ -0,0 +1,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; + }; +} |
