ooknet/nixos/modules/gaming/gamemode.nix
2024-06-11 22:37:17 +12:00

24 lines
479 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'";
};
};
};
};
}