fix: remove overwriting of forgejo port opening

This commit is contained in:
Nydragon 2025-01-26 22:44:36 +01:00
parent 2ec3341fec
commit 7f536764b8
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE
3 changed files with 10 additions and 10 deletions

View file

@ -151,21 +151,18 @@
security.polkit.enable = true; security.polkit.enable = true;
virtualisation.libvirtd.enable = true; virtualisation = {
programs.virt-manager.enable = true; libvirtd.enable = true;
};
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
shared-mime-info shared-mime-info
glib glib
wireguard-tools
dconf dconf
xdg-utils xdg-utils
brightnessctl brightnessctl
pop-icon-theme
kicad-small
]; ];
system.stateVersion = "24.11"; system.stateVersion = "24.11";

View file

@ -79,7 +79,7 @@ in
networking = { networking = {
nftables.enable = true; nftables.enable = true;
firewall = lib.mkForce { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
80 # for acme challenges 80 # for acme challenges
@ -109,6 +109,8 @@ in
port = 22; port = 22;
}; };
services.fail2ban.enable = true;
environment.systemPackages = map lib.lowPrio [ environment.systemPackages = map lib.lowPrio [
pkgs.curl pkgs.curl
pkgs.gitMinimal pkgs.gitMinimal

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
domain = "git.ccnlc.eu"; domain = "git.ccnlc.eu";
sshPort = 2222;
in in
{ {
systemd.tmpfiles.rules = systemd.tmpfiles.rules =
@ -15,7 +16,7 @@ in
"L+ ${config.services.forgejo.customDir}/public/robots.txt - - - - ${robots.outPath}" "L+ ${config.services.forgejo.customDir}/public/robots.txt - - - - ${robots.outPath}"
]; ];
networking.firewall.allowedTCPPorts = [ 2222 ]; networking.firewall.allowedTCPPorts = [ sshPort ];
services.nginx = { services.nginx = {
enable = true; enable = true;
@ -43,8 +44,8 @@ in
settings = { settings = {
server = { server = {
SSH_PORT = 2222; SSH_PORT = sshPort;
SSH_LISTEN_PORT = 2222; SSH_LISTEN_PORT = sshPort;
START_SSH_SERVER = true; START_SSH_SERVER = true;
DOMAIN = domain; DOMAIN = domain;
HTTP_PORT = 3000; HTTP_PORT = 3000;