quitte: fix portunus

This commit is contained in:
Rouven Seifert 2024-12-14 16:23:31 +01:00
parent e3dd58a1f9
commit 943e208e3a
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
4 changed files with 34 additions and 7 deletions

View file

@ -5,6 +5,7 @@
defaultConfig = '' defaultConfig = ''
$FileCreateMode 0640 $FileCreateMode 0640
:programname, isequal, "postfix" /var/log/postfix.log :programname, isequal, "postfix" /var/log/postfix.log
:programname, isequal, "portunus" /var/log/portunus.log
auth.* -/var/log/auth.log auth.* -/var/log/auth.log
''; '';

View file

@ -12,13 +12,6 @@
jvmOpts = "-Xmx8192M -Xms8192M"; jvmOpts = "-Xmx8192M -Xms8192M";
}; };
}; };
services.nginx.virtualHosts."map.mc.ifsr.de".extraConfig = ''
allow 141.30.0.0/16;
allow 141.76.0.0/16;
allow 217.160.244.15/32; # jonas uptime kuma
deny all;
'';
networking.firewall = { networking.firewall = {
extraInputRules = '' extraInputRules = ''
ip saddr { 141.30.0.0/16, 141.76.0.0/16, 217.160.244.15/32 } tcp dport 25565 accept comment "Allow minecraft access from TU network and jonas monitoring" ip saddr { 141.30.0.0/16, 141.76.0.0/16, 217.160.244.15/32 } tcp dport 25565 accept comment "Allow minecraft access from TU network and jonas monitoring"

View file

@ -24,4 +24,5 @@ in
]; ];
keycloak_ifsr_theme = callPackage ../modules/keycloak/theme.nix { }; keycloak_ifsr_theme = callPackage ../modules/keycloak/theme.nix { };
portunus = callPackage ./portunus.nix { };
} }

32
overlays/portunus.nix Normal file
View file

@ -0,0 +1,32 @@
{ lib
, buildGoModule
, fetchFromGitHub
, libxcrypt-legacy
, nixosTests
}:
buildGoModule rec {
pname = "portunus";
version = "2.1.1";
src = fetchFromGitHub {
owner = "majewsky";
repo = "portunus";
rev = "v${version}";
sha256 = "sha256-+pMMIutj+OWKZmOYH5NuA4a7aS5CD+33vAEC9bJmyfM=";
};
buildInputs = [ libxcrypt-legacy ];
vendorHash = null;
passthru.tests = { inherit (nixosTests) portunus; };
meta = with lib; {
description = "Self-contained user/group management and authentication service";
homepage = "https://github.com/majewsky/portunus";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ majewsky ] ++ teams.c3d2.members;
};
}