diff --git a/configuration.nix b/configuration.nix index d315e00..4c723a2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -23,6 +23,23 @@ boot.kernelParams = [ "net.ifnames=0" ]; + boot.kernelModules = [ "tcp_bbr" ]; + + boot.kernel.sysctl = { + # BBR congestion control — reduces latency by basing decisions on + # bandwidth and RTT rather than packet loss + "net.ipv4.tcp_congestion_control" = "bbr"; + # fq queue discipline — recommended with BBR for pacing + "net.core.default_qdisc" = "fq"; + # Low-latency TCP mode + "net.ipv4.tcp_low_latency" = 1; + # Socket buffer sizes for better throughput + "net.core.rmem_max" = 16777216; + "net.core.wmem_max" = 16777216; + "net.ipv4.tcp_rmem" = "4096 87380 16777216"; + "net.ipv4.tcp_wmem" = "4096 87380 16777216"; + }; + networking.hostName = "compsigh-minecraft"; networking.defaultGateway = "157.230.144.1"; networking.nameservers = [ "67.207.67.3" "67.207.67.2" ];