From 711778a97518dde73a23e162d1d4612a8a2995d6 Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 11 Oct 2022 05:27:51 -0700 Subject: [PATCH] servo: nginx stateless deployment of the main blog i.e. no need to run `make publish` when rebuilding the blog anymore. instead, push blog changes, then `nix flake update; nixos-rebuild switch` --- machines/servo/services/nginx.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/machines/servo/services/nginx.nix b/machines/servo/services/nginx.nix index b40850dc6..511cc1933 100644 --- a/machines/servo/services/nginx.nix +++ b/machines/servo/services/nginx.nix @@ -6,13 +6,17 @@ # web blog/personal site services.nginx.virtualHosts."uninsane.org" = { - root = "/var/lib/uninsane/root"; + root = "${pkgs.uninsane-dot-org}/share/uninsane-dot-org"; # a lot of places hardcode https://uninsane.org, # and then when we mix http + non-https, we get CORS violations # and things don't look right. so force SSL. forceSSL = true; enableACME = true; + # uninsane.org/share/foo => /var/lib/uninsane/root/share/foo. + # yes, nginx does not strip the prefix when evaluating against the root. + locations."/share".root = "/var/lib/uninsane/root"; + # allow matrix users to discover that @user:uninsane.org is reachable via matrix.uninsane.org locations."= /.well-known/matrix/server".extraConfig = let