init commit

This commit is contained in:
Luka Dekanozishvili 2026-01-19 21:47:18 +00:00
commit 181e6f681e
22 changed files with 940 additions and 0 deletions

30
pkgs/server-ssh.nix Normal file
View file

@ -0,0 +1,30 @@
{ pkgs, config, ... }:
{
services.openssh = {
enable = true;
ports = [ 6968 ];
openFirewall = true;
settings = {
PasswordAuthentication = false;
AllowUsers = [ "luka" ];
UseDns = false; # Disable checking of rDNS records to speed up login
X11Forwarding = false;
PermitRootLogin = "prohibit-password";
};
};
services.fail2ban = {
enable = false;
bantime = "24h"; # Ban IPs for one day on the first ban
# ignoreIP = [ ];
};
networking.firewall = {
enable = true;
# allowedTCPPorts = [ ];
# allowedUDPPorts = [];
};
}