48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ pkgs, config, lib, ... }: let
|
|
cfg = config.grimmShared;
|
|
in {
|
|
config = with cfg; lib.mkIf (enable && gaming) {
|
|
programs.steam = {
|
|
enable = true;
|
|
gamescopeSession.enable = true;
|
|
gamescopeSession.env = {
|
|
DRI_PRIME = "1";
|
|
};
|
|
};
|
|
|
|
programs.gamemode = {
|
|
enable = true;
|
|
settings = {
|
|
general = {
|
|
inhibit_screensaver=0;
|
|
renice = 10;
|
|
};
|
|
custom = {
|
|
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
|
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.udev.packages = [ pkgs.wooting-udev-rules ];
|
|
|
|
environment.sessionVariables = {
|
|
GAMEMODERUNEXEC="env DRI_PRIME=1";
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
heroic
|
|
prismlauncher
|
|
wootility
|
|
(pkgs.symlinkJoin {
|
|
name = "osu";
|
|
paths = [
|
|
(pkgs.writeShellScriptBin "osu!" ''exec gamemoderun ${pkgs.osu-lazer-bin}/bin/'osu!'
|
|
'')
|
|
pkgs.osu-lazer-bin
|
|
];
|
|
})
|
|
];
|
|
};
|
|
}
|