From 9170ce518c37693be2ac89c60d590f656b290b54 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Fri, 6 Feb 2026 15:36:48 -0600 Subject: [PATCH] Add puzzles module and nginx vhosts for puzzles.joshuabell.xyz --- hosts/h001/flake.nix | 13 ------------- hosts/h001/mods/default.nix | 1 + hosts/h001/mods/puzzles.nix | 24 ++++++++++++++++++++++++ hosts/oracle/o001/nginx.nix | 7 +++++++ 4 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 hosts/h001/mods/puzzles.nix diff --git a/hosts/h001/flake.nix b/hosts/h001/flake.nix index e88f5d0b..0b73198d 100644 --- a/hosts/h001/flake.nix +++ b/hosts/h001/flake.nix @@ -123,19 +123,6 @@ ) inputs.puzzles.nixosModules.default - ( - { pkgs, ... }: - { - services.puzzles-server = { - enable = true; - package = inputs.puzzles.packages.${pkgs.system}.default; - settings = { - http = "0.0.0.0:8093"; - }; - }; - } - ) - nixarr.nixosModules.default ./hardware-configuration.nix ./mods diff --git a/hosts/h001/mods/default.nix b/hosts/h001/mods/default.nix index fe2b770c..ffb5959c 100644 --- a/hosts/h001/mods/default.nix +++ b/hosts/h001/mods/default.nix @@ -18,5 +18,6 @@ ./openbao.nix ./homepage-dashboard.nix # ./vault.nix + ./puzzles.nix ]; } diff --git a/hosts/h001/mods/puzzles.nix b/hosts/h001/mods/puzzles.nix new file mode 100644 index 00000000..5b15e683 --- /dev/null +++ b/hosts/h001/mods/puzzles.nix @@ -0,0 +1,24 @@ +{ inputs, pkgs, ... }: +{ + services.nginx.virtualHosts = { + "puzzles.joshuabell.xyz" = { + addSSL = true; + sslCertificate = "/var/lib/acme/joshuabell.xyz/fullchain.pem"; + sslCertificateKey = "/var/lib/acme/joshuabell.xyz/key.pem"; + locations = { + "/" = { + proxyWebsockets = true; + recommendedProxySettings = true; + proxyPass = "http://127.0.0.1:8093"; + }; + }; + }; + }; + services.puzzles-server = { + enable = true; + package = inputs.puzzles.packages.${pkgs.system}.default; + settings = { + http = "127.0.0.1:8093"; + }; + }; +} diff --git a/hosts/oracle/o001/nginx.nix b/hosts/oracle/o001/nginx.nix index e0d15f5e..f2eafcae 100644 --- a/hosts/oracle/o001/nginx.nix +++ b/hosts/oracle/o001/nginx.nix @@ -237,6 +237,13 @@ in proxyPass = "http://100.64.0.13"; }; }; + "puzzles.joshuabell.xyz" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://100.64.0.13"; + }; + }; "llm.joshuabell.xyz" = { enableACME = true; forceSSL = true;