diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-04-14 17:32:30 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-04-14 18:58:54 -0700 |
| commit | 513a9fd74ef96a74fa8aabb536f2d424379cb85d (patch) | |
| tree | c1db4d173c89d4f9acbdd72e154456cf6a6b431c /snowfall/modules/nixos/services/web | |
| parent | e8ba21ee40f4ad7d813fc15a7341e601ea53f557 (diff) | |
migration: cxl.sh landing page webserver
Diffstat (limited to 'snowfall/modules/nixos/services/web')
| -rw-r--r-- | snowfall/modules/nixos/services/web/landing/default.nix | 34 | ||||
| -rw-r--r-- | snowfall/modules/nixos/services/web/personal/default.nix | 2 |
2 files changed, 35 insertions, 1 deletions
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"; + }; + }; + }; + }; +} diff --git a/snowfall/modules/nixos/services/web/personal/default.nix b/snowfall/modules/nixos/services/web/personal/default.nix index 6865830..daf94c1 100644 --- a/snowfall/modules/nixos/services/web/personal/default.nix +++ b/snowfall/modules/nixos/services/web/personal/default.nix @@ -37,7 +37,7 @@ in { enable = true; virtualHosts = { "caroline.larimo.re" = { - serverAliases = [ "cxl.sh" ]; + # serverAliases = [ "cxl.sh" ]; addSSL = true; enableACME = true; |