diff --git a/flake.nix b/flake.nix index 280ad0b..88294a1 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ ./modules/xconfig.nix ./modules/zsh.nix ./modules/prometheus.nix + ./modules/kernel.nix ]; }; @@ -24,6 +25,7 @@ ./modules/vim.nix ./modules/zsh.nix ./modules/prometheus.nix + ./modules/kernel.nix ]; }; diff --git a/modules/kernel.nix b/modules/kernel.nix new file mode 100644 index 0000000..a6ea8cc --- /dev/null +++ b/modules/kernel.nix @@ -0,0 +1,17 @@ +{ ... }: +with lib; +let cfg = config.voidcruiser.kernelTweaks; +in { + options.voidcruiser.kernelTweaks = { + 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"; + }; + }; + }; +}