From 31576bbfa05ee5493a50debfa34ccb09606d8697 Mon Sep 17 00:00:00 2001 From: Clayton Hickey Date: Sat, 7 Mar 2026 18:22:02 -0500 Subject: [PATCH] bikeability2 --- bikeability2.nix | 34 ++++++++++++++++++++++++++++++++++ cos.nix | 1 + 2 files changed, 35 insertions(+) create mode 100644 bikeability2.nix diff --git a/bikeability2.nix b/bikeability2.nix new file mode 100644 index 0000000..7898800 --- /dev/null +++ b/bikeability2.nix @@ -0,0 +1,34 @@ +{ pkgs, config, lib, ... }: +let + wordpressPort = 5781; +in +{ + config = lib.mkMerge [ + (lib.mkIf (config.networking.hostName == "nixnas") { + services.wordpress.sites."bikeability.net" = { + virtualHost.listen = [{ + port = wordpressPort; + ip = "127.0.0.1"; + }]; + settings = { + FORCE_SSL_ADMIN = true; + }; + extraConfig = '' + $_SERVER['HTTPS']='on'; + ''; + plugins = { + wpcode = pkgs.stdenv.mkDerivation rec { + name = "wpcode"; + version = "2.3.3"; + src = pkgs.fetchzip { + url = "https://downloads.wordpress.org/plugins/insert-headers-and-footers.${version}.zip"; + hash = "sha256-BjQ62ZvWck/e0kcP6Ny1pOGAfsPVUDQLrvGnvkeq6FY="; + }; + installPhase = "mkdir -p $out; cp -R * $out/"; + }; + }; + }; + services.cloudflared.tunnels.mine.ingress."bikeability.net" = "http://127.0.0.1:${builtins.toString wordpressPort}"; + }) + ]; +} diff --git a/cos.nix b/cos.nix index 04c9387..e45d359 100644 --- a/cos.nix +++ b/cos.nix @@ -13,6 +13,7 @@ ./mastodon.nix ./cloudflared.nix ./umami.nix + ./bikeability2.nix "${inputs.home-manager}/nixos" inputs.nix-minecraft.nixosModules.minecraft-servers ];