about summary refs log tree commit diff
path: root/modules/games/gamemode.nix
blob: eb485f8220826a712b1d426bd3d505dc4494b955 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ 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