Watch
0
0
Fork
You've already forked hyperhive
0

forge: its own netns, HTTP on a unix socket, git over HTTPS only

The hive-forge container leaves the host netns and listens on no TCP port: Forgejo serves HTTP on a unix socket the gateway proxies to, and the built-in SSH server is off. The httpPort, sshPort and openFirewall options are removed with a message each.
This commit is contained in:
maia 2026-11-22 19:44:19 +01:00 • committed by mara
commit fc70f538ac

View file

@ -29,17 +29,19 @@ in
# flake + every agent's config repo (and the `internal/*` repos) — but
# only one host runs it: `deploy.forgejo.enable`, in ../deploy.nix. What
# follows is what every hive needs to reach it, wherever it runs.
options.services.hyperhive.swarm.forge = {
sshPort = lib.mkOption {
type = lib.types.port;
default = 2222;
description = ''
TCP port the forge's built-in SSH server listens on. Kept off
22 so it doesn't clash with the host's openssh. Agents push
with `ssh -p <sshPort> git@<domain>:<owner>/<repo>.git`.
'';
};
imports = [
(lib.mkRemovedOptionModule [ "services" "hyperhive" "swarm" "forge" "sshPort" ] ''
The forge runs no SSH server: git goes over HTTPS through the gateway
(`https://<domain>/<owner>/<repo>.git`). Remove this definition, and
point any remote that used `ssh -p <sshPort>` at the HTTPS URL.
'')
(lib.mkRemovedOptionModule [ "services" "hyperhive" "swarm" "forge" "httpPort" ] ''
The forge listens on a unix socket inside its own network namespace, so
it has no TCP port to name. Remove this definition.
'')
];
options.services.hyperhive.swarm.forge = {
domain = lib.mkOption {
type = lib.types.str;
# Under the SWARM domain, not this hive's: a swarm runs one forge