set up forgejo ports for ssh correctly

This commit is contained in:
Clara Dautermann 2025-04-18 08:57:00 +02:00
parent 7693a3ccc0
commit 9bec44c636
Signed by: clara
GPG key ID: 223391B52FAD4463

View file

@ -1,7 +1,8 @@
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
let let
dbname = "forgejo"; dbname = "forgejo";
ssh_port = 2224; ssh_port = 2225;
http_port = 3000;
domain = "new.git.cdaut.de"; domain = "new.git.cdaut.de";
in in
{ {
@ -19,6 +20,7 @@ in
ROOT_URL = "https://${domain}"; ROOT_URL = "https://${domain}";
DOMAIN = domain; DOMAIN = domain;
SSH_PORT = ssh_port; SSH_PORT = ssh_port;
HTTP_PORT = http_port;
# important because otherwise ssh doesn't seem to work… # important because otherwise ssh doesn't seem to work…
START_SSH_SERVER = true; START_SSH_SERVER = true;
BUILTIN_SSH_SERVER_USER = "git"; BUILTIN_SSH_SERVER_USER = "git";
@ -39,6 +41,6 @@ in
ensureDatabases = [ dbname ]; ensureDatabases = [ dbname ];
}; };
networking.firewall.allowedTCPPorts = [ 3000 ssh_port ]; networking.firewall.allowedTCPPorts = [ http_port ssh_port ];
} }