23 lines
598 B
Nix
23 lines
598 B
Nix
{ 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.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;
|
|
};
|
|
};
|
|
} |