move some things around

This commit is contained in:
Reid 2024-12-18 16:55:30 -08:00
parent af25753785
commit 473362b5f8
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
7 changed files with 36 additions and 42 deletions

View file

@ -0,0 +1,26 @@
{ 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;
};
};
};
};
}

View file

@ -11,29 +11,6 @@ in {
config = mkIf cfg.enable {
programs.steam.enable = true;
# optimize linux system performance on demand
# https://github.com/FeralInteractive/gamemode
user.extraGroups = [ "gamemode" ];
programs.gamemode = {
enable = true;
enableRenice = true;
settings = {
custom = {
start = "${pkgs.libnotify}/bin/notify-send --app-name GameMode 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send --app-name GameMode 'GameMode ended'";
};
};
};
programs.gamescope = {
enable = true;
capSysNice = true;
};
programs.steam.gamescopeSession = {
enable = true;
args = [ "-W 1920" "-H 1080" "-r 60" "--expose-wayland" "-e" ];
};
user.packages = [ pkgs.protontricks pkgs.steam-run ];
};
}