diff options
| author | toufic ar <contact@toufy.me> | 2026-04-22 14:08:19 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-04-22 14:08:19 +0300 |
| commit | c7349e466fef7ecff5a46b1d0c819975a6bdcb8c (patch) | |
| tree | 2a3fc53016ae4d0b31d7583171bd4b8e60f4cc17 /common/network.nix | |
| download | servers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.tar.gz servers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.zip | |
initial commit
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; + }; +} |
