ooknet/nixos/modules/gaming/gamemode.nix

25 lines
485 B
Nix

{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.gamemode;
in {
config = mkIf cfg.enable {
programs.gamemode = {
enable = true;
settings = {
general = {
renice = 15;
softrealtime = "auto";
};
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
};
};
}