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

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

    programs.gamemode.enable = true;
  };
}

Consider giving Nix/NixOS a try! <3