voidconf/modules/kernel.nix

18 lines
389 B
Nix
Raw Permalink Normal View History

2024-01-01 17:27:31 +01:00
{ lib, config, ... }:
2024-01-01 17:23:16 +01:00
with lib;
2024-02-17 18:49:37 +01:00
let cfg = config.voidconf.kernelTweaks;
2024-01-01 17:23:16 +01:00
in {
2024-02-17 18:49:37 +01:00
options.voidconf.kernelTweaks = {
2024-01-01 17:23:16 +01:00
enable = mkEnableOption "Enables kernel tweaks";
};
config = mkIf cfg.enable {
boot = {
kernelModules = [ "tcp_bbr" ];
kernel.sysctl = {
"net.ipv4.tcp_congestion_control" = "bbr";
"net.core.default_qdisc" = "fq";
};
};
};
}