about summary refs log tree commit diff
path: root/modules/nixos/games/gamemode.nix
blob: 193a764cd433d2fd9b1abe4d07d9add3d0e65f0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  config,
  lib,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.games.gamemode;
in {
  options.nixfiles.modules.games.gamemode.enable =
    mkEnableOption "Feral GameMode";

  config = mkIf cfg.enable {
    hm.xdg.configFile."gamemode.ini".text = generators.toINI {} {
      general.softrealtime = "auto";
    };

    programs.gamemode.enable = true;
  };
}

Consider giving Nix/NixOS a try! <3