From 84abe3df5cb6b05ee69aca4233a992bf14e8c3ea Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 7 Nov 2025 07:56:21 -0500 Subject: [PATCH 1/2] Update config for Plausible script --- modules/hosts/nixos/hetznix02/post-install/nginx.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/hosts/nixos/hetznix02/post-install/nginx.nix b/modules/hosts/nixos/hetznix02/post-install/nginx.nix index 6f2ad9f..c794b63 100644 --- a/modules/hosts/nixos/hetznix02/post-install/nginx.nix +++ b/modules/hosts/nixos/hetznix02/post-install/nginx.nix @@ -10,8 +10,8 @@ in { source = pkgs.fetchFromGitHub { owner = "genebean"; repo = "littlelink"; - rev = "genebean-1.0.1"; - hash = "sha256-r7cvcKdlivQ2MA1UhypwdJrg7CREzTZE5fiNA9AWY/0="; + rev = "genebean-1.0.2"; + hash = "sha256-Fr1Qt/YaXNoDI4WHUuI2s852ENte8GjOmJrtEpq/SfY="; }; }; @@ -78,9 +78,12 @@ in { "/github" = { return = "301 https://github.com/genebean"; }; - "/js/script.outbound-links.js" = { - proxyPass = "https://stats.technicalissues.us/js/script.outbound-links.js"; + "/js/script.hash.outbound-links.js" = { + proxyPass = "https://stats.technicalissues.us/js/script.hash.outbound-links.js"; proxyWebsockets = true; + extraConfig = '' + add_header Content-Type application/x-javascript; + ''; }; "/mastodon" = { return = "302 https://fosstodon.org/@genebean"; From 2e7db512ea49bb85b655f9e463ee8506e4dc8f79 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 7 Nov 2025 08:39:10 -0500 Subject: [PATCH 2/2] Update proxy --- .../hosts/nixos/hetznix02/post-install/nginx.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/modules/hosts/nixos/hetznix02/post-install/nginx.nix b/modules/hosts/nixos/hetznix02/post-install/nginx.nix index c794b63..dbc200d 100644 --- a/modules/hosts/nixos/hetznix02/post-install/nginx.nix +++ b/modules/hosts/nixos/hetznix02/post-install/nginx.nix @@ -1,8 +1,6 @@ -{ config, pkgs, ... }: let +{ pkgs, ... }: let domain = "genebean.me"; - http_port = 80; - https_port = 443; in { environment.etc.nginx-littlelinks = { # Info generated via @@ -28,7 +26,7 @@ in { recommendedBrotliSettings = true; recommendedGzipSettings = true; recommendedOptimisation = true; - recommendedProxySettings = true; + #recommendedProxySettings = true; recommendedTlsSettings = true; appendHttpConfig = '' # Add HSTS header with preloading to HTTPS requests. @@ -47,10 +45,8 @@ in { enableACME = true; acmeRoot = null; forceSSL = true; + root = "/etc/nginx-littlelinks"; locations = { - "/" = { - root = "/etc/nginx-littlelinks"; - }; "/.well-known/lnurlp/genebean" = { return = '' 200 '{"status":"OK","tag":"payRequest","commentAllowed":255,"callback":"https://getalby.com/lnurlp/genebean/callback","metadata":"[[\\"text/identifier\\",\\"genebean@getalby.com\\"],[\\"text/plain\\",\\"Sats for GeneBean\\"]]","minSendable":1000,"maxSendable":10000000000,"payerData":{"name":{"mandatory":false},"email":{"mandatory":false},"pubkey":{"mandatory":false}},"nostrPubkey":"79f00d3f5a19ec806189fcab03c1be4ff81d18ee4f653c88fac41fe03570f432","allowsNostr":true}' @@ -73,17 +69,12 @@ in { }; "/api/event" = { proxyPass = "https://stats.technicalissues.us/api/event"; - proxyWebsockets = true; }; "/github" = { return = "301 https://github.com/genebean"; }; "/js/script.hash.outbound-links.js" = { proxyPass = "https://stats.technicalissues.us/js/script.hash.outbound-links.js"; - proxyWebsockets = true; - extraConfig = '' - add_header Content-Type application/x-javascript; - ''; }; "/mastodon" = { return = "302 https://fosstodon.org/@genebean";