From 52cdeaf4cc9da9d32926821c78fd331bc8d2f14a Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Tue, 29 Sep 2026 23:29:28 -0700 Subject: restructure for cgit css --- nix/web.nix | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'nix/web.nix') diff --git a/nix/web.nix b/nix/web.nix index b34f8d8..0013d4f 100644 --- a/nix/web.nix +++ b/nix/web.nix @@ -1,8 +1,32 @@ -{...}: { - # dont serve git.kassouni.net traffic to other subdomains - services.nginx.virtualHosts."_" = { - default = true; - rejectSSL = true; - locations."/".return = 444; +{inputs, pkgs, ...}: let + domain = "kassouni.net"; +in { + services.nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedTlsSettings = true; + + virtualHosts = { + # dont serve kassouni.net traffic to other subdomains + "_" = { + default = true; + rejectSSL = true; + locations."/".return = 444; + }; + + ${domain} = { + forceSSL = true; + enableACME = true; + root = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.website; + }; + }; }; + + security.acme = { + acceptTerms = true; + defaults.email = "alex@${domain}"; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; } -- cgit v1.3.1