From 86c698e39e956721ee153721f6cb518a96db42d0 Mon Sep 17 00:00:00 2001 From: alexion Date: Thu, 22 Oct 2026 16:51:17 -0400 Subject: [PATCH] fix(nixos): retain Gitea LXC routes --- configs/nixos/README.md | 2 +- configs/nixos/guests/reverse-proxy.nix | 11 +++++------ configs/nixos/modules/network/ssh.nix | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/nixos/README.md b/configs/nixos/README.md index f199b6d..2098e44 100644 --- a/configs/nixos/README.md +++ b/configs/nixos/README.md @@ -102,7 +102,7 @@ Confirm you have connectivity (`ping -c1 github.com`) before continuing. Clone the monorepo onto the live ISO and work from that local checkout: ```console -$ git clone ssh://gitea@git.alexion.dev/alexion/dev.git +$ git clone ssh://gitea@git.alexion.dev:2022/alexion/dev.git $ cd dev ``` diff --git a/configs/nixos/guests/reverse-proxy.nix b/configs/nixos/guests/reverse-proxy.nix index e3d1a41..3ad5fa9 100644 --- a/configs/nixos/guests/reverse-proxy.nix +++ b/configs/nixos/guests/reverse-proxy.nix @@ -1,11 +1,10 @@ { config, lib, - registry, ... }: let - giteaAddress = registry.address.${config.networking.hostName}.gitea; + giteaSshBackend = "10.23.20.45:2022"; in { config = lib.mkIf config.guests.reverse-proxy.enable { @@ -17,7 +16,7 @@ in "git.alexion.dev" = { forceSSL = true; enableACME = true; - locations."/".proxyPass = "http://${giteaAddress}:3000"; + locations."/".proxyPass = "http://10.23.20.32"; }; "photos.alexion.dev" = { forceSSL = true; @@ -46,12 +45,12 @@ in }; }; - networking.firewall.allowedTCPPorts = [ 22 ]; + networking.firewall.allowedTCPPorts = [ 2022 ]; services.nginx.streamConfig = '' server { - listen 22; - proxy_pass ${giteaAddress}:2222; + listen 2022; + proxy_pass ${giteaSshBackend}; } ''; }; diff --git a/configs/nixos/modules/network/ssh.nix b/configs/nixos/modules/network/ssh.nix index d798197..3a20988 100644 --- a/configs/nixos/modules/network/ssh.nix +++ b/configs/nixos/modules/network/ssh.nix @@ -33,9 +33,10 @@ let }); extraTargets = { - # TODO: Pin Gitea's host key after deploying its Pikachu guest. + # TODO: Pin Gitea's host key after migrating it from Proxmox. gitea = { hostName = "git.alexion.dev"; + port = 2022; user = "gitea"; aliases = [ "gitea"