30 lines
612 B
Nix
30 lines
612 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.ptw.services.gamemode;
|
|
in {
|
|
options.ptw.services.gamemode = {
|
|
enable = lib.mkEnableOption "Enable and configure gamemode";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.gamemode = {
|
|
enable = true;
|
|
enableRenice = true;
|
|
settings = {
|
|
general = {
|
|
reaper_freq = 5;
|
|
desiredgov = "performance";
|
|
igpu_desiredgov = "powersave";
|
|
igpu_power_threshold = 0.3;
|
|
|
|
softrealtime = "on";
|
|
renice = 0;
|
|
ioprio = 0;
|
|
inhibit_screensaver = 1;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|