Set gitea SSH port correctly, setup ssh config definition for SSH

This commit is contained in:
Evie Litherland-Smith 2023-05-16 12:06:49 +01:00
parent e0035cef4d
commit fbc8315be8
2 changed files with 5 additions and 6 deletions

View file

@ -2,11 +2,10 @@
{ {
imports = [ ./common.nix ]; imports = [ ./common.nix ];
programs.ssh.matchBlocks = { programs.ssh.matchBlocks = {
"legion" = { port = 30; }; "vanguard" = { user = "xenia"; };
"vanguard" = { hostname = "192.168.1.166"; port = 2222; }; "git.xenia.me.uk" = { user = "git"; };
"legion vanguard" = lib.hm.dag.entryAfter [ "legion" "vanguard" ] { "vanguard *xenia.me.uk" = lib.hm.dag.entryAfter [ "vanguard" ] {
user = "root"; hostname = "192.168.1.166"; port = 2222;
forwardAgent = true;
}; };
}; };
} }

View file

@ -3,7 +3,7 @@
imports = [ ./traefik.nix ./fail2ban.nix ]; imports = [ ./traefik.nix ./fail2ban.nix ];
services.gitea = { services.gitea = {
enable = true; enable = true;
settings.server = { DOMAIN = "git.xenia.me.uk"; }; # SSH_PORT = 2222; }; settings.server = { DOMAIN = "git.xenia.me.uk"; SSH_PORT = 2222; };
appName = "Gitea"; appName = "Gitea";
}; };
networking.firewall.allowedTCPPorts = [ 80 443 2222 ]; networking.firewall.allowedTCPPorts = [ 80 443 2222 ];