diff options
author | Linnnus <[email protected]> | 2024-03-02 17:52:40 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-03-02 21:44:19 +0100 |
commit | d4f0263d517090d0fe30f7081041dff3fd2cdc77 (patch) | |
tree | 32bf2493f3a2cd52ad1b446bc38c9e89515eec18 /hosts/ahmed/hellohtml.linus.onl/default.nix | |
parent | cff432ef468fc90092549efaa53f4a1518835f9c (diff) |
Bump HelloHTML
It now takes an alternative domain, which was added to it's services.
Diffstat (limited to 'hosts/ahmed/hellohtml.linus.onl/default.nix')
-rw-r--r-- | hosts/ahmed/hellohtml.linus.onl/default.nix | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/hosts/ahmed/hellohtml.linus.onl/default.nix b/hosts/ahmed/hellohtml.linus.onl/default.nix index 584e030..4859ed3 100644 --- a/hosts/ahmed/hellohtml.linus.onl/default.nix +++ b/hosts/ahmed/hellohtml.linus.onl/default.nix @@ -1,21 +1,34 @@ # This module defines the HelloHTML web server. It extends the NGINX config # with a virtual server that proxies the local HelloHTML service. {...}: let + mainDomain = "hellohtml.linus.onl"; + altDomain = "hellohtml.ulovlighacker.download"; + useACME = true; in { config = { # Start service listening on socket /tmp/hellohtml.sock services.hellohtml = { enable = true; + inherit altDomain; }; - # Register domain name. - services.cloudflare-dyndns.domains = ["hellohtml.linus.onl"]; + # Register domain names. + services.cloudflare-dyndns.domains = [ + mainDomain + altDomain + ]; # Use NGINX as reverse proxy. - services.nginx.virtualHosts."hellohtml.linus.onl" = { + services.nginx.virtualHosts.${mainDomain}= { + # Set up secondary domain name to also point to this host. Only the + # client (browser) should treat these as separate. On the server, they + # are the same. + serverAliases = [altDomain]; + enableACME = useACME; forceSSL = useACME; + locations."/" = rec { proxyPass = "http://localhost:8538"; # Disable settings that might mess with the text/event-stream response of the /listen/:id endpoint. |