Change forgejo ssh port
This commit is contained in:
parent
2ed07e5564
commit
5acce8f41a
3 changed files with 8 additions and 8 deletions
|
|
@ -8,6 +8,4 @@
|
||||||
horseman.stateVersion = "24.11";
|
horseman.stateVersion = "24.11";
|
||||||
|
|
||||||
networking.hostName = "solis";
|
networking.hostName = "solis";
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [3000 3001];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{
|
{
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
|
@ -23,7 +21,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
sshPort = mkOption {
|
sshPort = mkOption {
|
||||||
default = 34916;
|
default = 16718;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,14 @@ in {
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
streamConfig = ''
|
# forwards SSH traffic to the git instance
|
||||||
|
streamConfig = let
|
||||||
|
port = toString config.horseman.containers.forgejo.sshPort;
|
||||||
|
addr = config.containers.forgejo.localAddress;
|
||||||
|
in ''
|
||||||
server {
|
server {
|
||||||
listen ${toString config.horseman.containers.forgejo.sshPort};
|
listen ${port};
|
||||||
proxy_pass ${config.containers.forgejo.localAddress}:${toString config.horseman.containers.forgejo.sshPort};
|
proxy_pass ${addr}:${port};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue