From 513a9fd74ef96a74fa8aabb536f2d424379cb85d Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Mon, 14 Apr 2025 17:32:30 -0700 Subject: migration: cxl.sh landing page webserver --- .../modules/nixos/services/web/landing/default.nix | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 snowfall/modules/nixos/services/web/landing/default.nix (limited to 'snowfall/modules/nixos/services/web/landing') diff --git a/snowfall/modules/nixos/services/web/landing/default.nix b/snowfall/modules/nixos/services/web/landing/default.nix new file mode 100644 index 0000000..fe9e92b --- /dev/null +++ b/snowfall/modules/nixos/services/web/landing/default.nix @@ -0,0 +1,34 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.services.web.landing; + impermanence = config.${namespace}.system.impermanence; +in { + options.${namespace}.services.web.landing = with types; { + enable = mkEnableOption "cxl.sh landing page webserver"; + }; + + config = mkIf cfg.enable { + cxl.services.web.enable = true; + + environment.persistence.${impermanence.location} = { + directories = [ + "/srv/web/landing" + ]; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; + + services.nginx = { + enable = true; + virtualHosts = { + "cxl.sh" = { + addSSL = true; + enableACME = true; + + root = "/srv/web/landing"; + }; + }; + }; + }; +} -- cgit v1.2.3