From 59ad1090685aae03bee47a5e5deee8524eff9c7d Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:19:45 -0800 Subject: [PATCH] feat(tanzanite): nginx configuration for website --- hosts/tanzanite/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 2af54d3..63414e5 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -17,6 +17,7 @@ in { data-root = "/opt/data"; }; }; + security.acme = { acceptTerms = true; defaults.email = "stitchy@stitchy.moe"; @@ -26,9 +27,22 @@ in { }; }; + services.nginx = { + enable = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + "stitchy.moe" = { + enableACME = true; + forceSSL = true; + root = "/opt/www/stitchy.moe/public"; + }; }; + }; + networking.firewall = { allowedTCPPorts = [ 22 80 222 443 ]; + }; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ];