add performance tuning stuff
This commit is contained in:
23
modules/nixos/perfomance-tuning/default.nix
Normal file
23
modules/nixos/perfomance-tuning/default.nix
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user