feat(nixos): cut over Gitea to Pikachu

This commit is contained in:
alexion committed 2026-10-22 19:08:50 -04:00
1 parent c6ccae1714
commit a28ecf6040
4 files changed
+9 -16

No files matched your search

+1 -1
View File
@@ -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: Clone the monorepo onto the live ISO and work from that local checkout:
```console ```console
$ git clone ssh://gitea@git.alexion.dev:2022/alexion/dev.git $ git clone ssh://gitea@git.alexion.dev/alexion/dev.git
$ cd dev $ cd dev
``` ```
+6 -5
View File
@@ -1,10 +1,11 @@
{ {
config, config,
lib, lib,
registry,
... ...
}: }:
let let
giteaSshBackend = "10.23.20.45:2022"; giteaAddress = registry.address.${config.networking.hostName}.gitea;
in in
{ {
config = lib.mkIf config.guests.reverse-proxy.enable { config = lib.mkIf config.guests.reverse-proxy.enable {
@@ -16,7 +17,7 @@ in
"git.alexion.dev" = { "git.alexion.dev" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/".proxyPass = "http://10.23.20.32"; locations."/".proxyPass = "http://${giteaAddress}:3000";
}; };
"photos.alexion.dev" = { "photos.alexion.dev" = {
forceSSL = true; forceSSL = true;
@@ -45,12 +46,12 @@ in
}; };
}; };
networking.firewall.allowedTCPPorts = [ 2022 ]; networking.firewall.allowedTCPPorts = [ 22 ];
services.nginx.streamConfig = '' services.nginx.streamConfig = ''
server { server {
listen 2022; listen 22;
proxy_pass ${giteaSshBackend}; proxy_pass ${giteaAddress}:2222;
} }
''; '';
}; };
+1 -2
View File
@@ -33,10 +33,9 @@ let
}); });
extraTargets = { extraTargets = {
# TODO: Pin Gitea's host key after migrating it from Proxmox. # TODO: Pin Gitea's host key after deploying its Pikachu guest.
gitea = { gitea = {
hostName = "git.alexion.dev"; hostName = "git.alexion.dev";
port = 2022;
user = "gitea"; user = "gitea";
aliases = [ aliases = [
"gitea" "gitea"
+1 -8
View File
@@ -57,15 +57,8 @@ in
SSH_LISTEN_PORT = 2222; SSH_LISTEN_PORT = 2222;
REVERSE_PROXY_TRUSTED_PROXIES = "${cfg.reverseProxyAddress}/32"; REVERSE_PROXY_TRUSTED_PROXIES = "${cfg.reverseProxyAddress}/32";
}; };
migrations.ALLOWED_HOST_LIST = lib.concatStringsSep "," [
"git.alexion.dev:80"
"git.alexion.dev:443"
"10.23.20.109/32:80"
"10.23.20.109/32:443"
];
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
# Direct bootstrap access uses HTTP until the public HTTPS route moves. session.COOKIE_SECURE = true;
session.COOKIE_SECURE = false;
}; };
}; };
}) })