From 6ab89907a07e0b40759778dd29ebbdfd5dcb910f Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 30 Mar 2022 12:24:05 -0400 Subject: Move to nixpert.chat domain name I'm also just using the que.run stylesheet for now. Eventually I should make this a base stylesheet, instead of nesting it under Biz/Que, but that can come later. --- Biz/Cloud/Web.nix | 1 + Biz/Nixpert.md | 5 ----- Biz/Nixpert.nix | 21 +++++++++++++++------ Biz/Nixpert/ChatWidget.html | 2 ++ 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 Biz/Nixpert/ChatWidget.html diff --git a/Biz/Cloud/Web.nix b/Biz/Cloud/Web.nix index 442024e..3c7acea 100644 --- a/Biz/Cloud/Web.nix +++ b/Biz/Cloud/Web.nix @@ -169,6 +169,7 @@ in security.acme.certs.${rootDomain}.extraDomainNames = [ "bsima.me" "www.bsima.me" "dragons.dev" "devalloc.io" + "nixpert.chat" ] ++ map (sub: "${sub}.${rootDomain}") [ "tv" "matrix" diff --git a/Biz/Nixpert.md b/Biz/Nixpert.md index 4e6a163..2d2f963 100644 --- a/Biz/Nixpert.md +++ b/Biz/Nixpert.md @@ -1,10 +1,5 @@ --- title: Nixpert.chat -header-includes: | - - - --- [Nix](https://nixos.org) is a hermetic, deterministic, and declarative build system, package manager, and operating system. It will save you time and money by making sure: diff --git a/Biz/Nixpert.nix b/Biz/Nixpert.nix index 2eae9d6..51c6e66 100644 --- a/Biz/Nixpert.nix +++ b/Biz/Nixpert.nix @@ -8,7 +8,10 @@ let ${pkgs.pandoc}/bin/pandoc \ --standalone \ -f commonmark_x \ - -t html ${./Chat.md} \ + --include-in-header ${./Que/Style.css} \ + --include-in-header ${./Nixpert/ChatWidget.html} \ + -t html \ + ${./Nixpert.md} \ > $out/index.html ''; ports = import ../Cloud/Ports.nix; @@ -119,11 +122,17 @@ in { ''; }; - services.nginx.virtualHosts."simatime.com".locations."/" = { - root = "${salespage}"; - extraConfig = '' - add_header Access-Control-Allow-Origin "*"; - ''; + services.nginx.virtualHosts."simatime.com".locations."/".return = "301 https://nixpert.chat"; + + services.nginx.virtualHosts."nixpert.chat" = { + forceSSL = true; + enableACME = true; + locations."/" = { + root = "${salespage}"; + extraConfig = '' + add_header Access-Control-Allow-Origin "*"; + ''; + }; }; services.nginx.virtualHosts."simatime.com".locations."/xmpp-websocket" = { diff --git a/Biz/Nixpert/ChatWidget.html b/Biz/Nixpert/ChatWidget.html new file mode 100644 index 0000000..f9a77cf --- /dev/null +++ b/Biz/Nixpert/ChatWidget.html @@ -0,0 +1,2 @@ + + -- cgit v1.2.3