ssh config for git

This commit is contained in:
Kopatz
2026-03-14 21:05:58 +01:00
parent c07acb5268
commit e609400d4e
2 changed files with 12 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ in
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
server.DOMAIN = cfg.fqdn; server.DOMAIN = cfg.fqdn;
server.ROOT_URL = "https://${cfg.fqdn}"; server.ROOT_URL = "https://${cfg.fqdn}";
server.DISABLE_SSH = true; #server.DISABLE_SSH = true;
}; };
}; };
services.nginx.virtualHosts."${cfg.fqdn}" = { services.nginx.virtualHosts."${cfg.fqdn}" = {

View File

@@ -157,6 +157,17 @@
}; };
}; };
services.openssh.extraConfig = ''
# Internal network: allow everyone
Match Address 192.168.2.0/24,192.168.0.0/24
AllowUsers *
# Everything else (internet): only git user
Match Address *,!192.168.2.0/24,!192.168.0.0/24
PermitRootLogin no
AllowUsers gitea
'';
virtualisation.vmware.guest.enable = true; virtualisation.vmware.guest.enable = true;
services.xserver.videoDrivers = [ "vmware" ]; services.xserver.videoDrivers = [ "vmware" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [