Git : Enable ssh.

This commit is contained in:
Dmitry Voronin 2024-08-24 18:01:30 +03:00
parent fdff73c645
commit 5a28e1ddf9
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 11 additions and 1 deletions

View file

@ -12,6 +12,10 @@ in {
default = 3000;
type = types.int;
};
portSsh = mkOption {
default = 22144;
type = types.int;
};
domain = mkOption {
default = "git.${config.container.domain}";
type = types.str;
@ -61,7 +65,9 @@ in {
"service".DISABLE_REGISTRATION = true;
"log".LEVEL = "Error";
"server" = {
DISABLE_SSH = true;
DISABLE_SSH = false;
SSH_PORT = cfg.portSsh;
START_SSH_SERVER = true;
DOMAIN = cfg.domain;
HTTP_ADDR = cfg.address;
ROOT_URL = "https://${cfg.domain}";

View file

@ -80,6 +80,10 @@ in {
+ (mkForward external 54631 cfg.download.address 54631 tcp)
+ (mkForward external 54630 cfg.download.address 54630 udp)
+ (mkForward external 54631 cfg.download.address 54631 udp)
# Git ssh connections.
+ (mkForward external cfg.git.portSsh cfg.git.address cfg.git.portSsh tcp)
+ (mkForward internal cfg.git.portSsh cfg.git.address cfg.git.portSsh tcp)
;
};