{ lib, config, pkgs, ... }: with lib; let cfg = config.modules.software.distractions.gamemode; in { options.modules.software.distractions.gamemode = { enable = mkEnableOption "Enable Gamemode, a program to optimize your system performance on demand"; }; config = mkIf cfg.enable { # optimize linux system performance on demand # https://github.com/FeralInteractive/gamemode user.extraGroups = [ "gamemode" ]; programs.gamemode = { enable = true; enableRenice = true; settings = { general = { softrealtime = "auto"; renice = 10; }; }; }; }; }