From 58206b4c80c737c59cb40fc401cf4342d5aef0e6 Mon Sep 17 00:00:00 2001 From: Andreas Schaafsma Date: Tue, 27 Jan 2026 01:20:40 +0100 Subject: [PATCH] add performance tuning stuff --- modules/nixos/perfomance-tuning/default.nix | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 modules/nixos/perfomance-tuning/default.nix diff --git a/modules/nixos/perfomance-tuning/default.nix b/modules/nixos/perfomance-tuning/default.nix new file mode 100644 index 0000000..149f5b1 --- /dev/null +++ b/modules/nixos/perfomance-tuning/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, namespace, ... }: + +let + cfg = config.${namespace}.performance-tuning; +in { + options.${namespace}.performance-tuning.enable = lib.mkEnableOption "XFCE desktop environment"; + config = lib.mkIf cfg.xfce.enable { + boot.kernelParams = [ + "nvme_core.default_ps_max_latency_us=0" + ]; + + boot.kernel.sysctl = { + "vm.swappiness" = 10; + "vm.dirty_ratio" = 10; + "vm.dirty_background_ratio" = 5; + }; + + services.pipewire.extraConfig.pipewire."context.properties" = { + "default.clock.quantum" = 256; + "default.clock.min-quantum" = 128; + }; + }; +} \ No newline at end of file