Game scope
This commit is contained in:
parent
856e589495
commit
727f7a8c97
2 changed files with 24 additions and 2 deletions
|
|
@ -111,6 +111,7 @@
|
||||||
distractions.discord.enable = true;
|
distractions.discord.enable = true;
|
||||||
distractions.discord.vesktop = true;
|
distractions.discord.vesktop = true;
|
||||||
distractions.steam.enable = true;
|
distractions.steam.enable = true;
|
||||||
|
distractions.steam.gamescope = true;
|
||||||
# tools
|
# tools
|
||||||
tools.direnv.enable = true;
|
tools.direnv.enable = true;
|
||||||
tools.easyeffects.enable = true;
|
tools.easyeffects.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ let
|
||||||
in {
|
in {
|
||||||
options.modules.software.distractions.steam = {
|
options.modules.software.distractions.steam = {
|
||||||
enable = mkEnableOption "Enable Steam, the game distribution software";
|
enable = mkEnableOption "Enable Steam, the game distribution software";
|
||||||
|
gamescope = mkEnableOption "Enable gamescope, a mini-compositor tuned for games";
|
||||||
session = mkEnableOption "Enable a Steam Deck-like session powered by gamescope";
|
session = mkEnableOption "Enable a Steam Deck-like session powered by gamescope";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -16,7 +17,7 @@ in {
|
||||||
package = pkgs.steam.override {
|
package = pkgs.steam.override {
|
||||||
# required for programs to run sometimes
|
# required for programs to run sometimes
|
||||||
# see: https://github.com/NixOS/nixpkgs/issues/162562#issuecomment-1229444338
|
# see: https://github.com/NixOS/nixpkgs/issues/162562#issuecomment-1229444338
|
||||||
extraPkgs = (pkgs: with pkgs; [
|
extraPkgs = (pkgs: (optional cfg.gamescope pkgs.gamescope) ++ (with pkgs; [
|
||||||
libXcursor
|
libXcursor
|
||||||
libXi
|
libXi
|
||||||
libXinerama
|
libXinerama
|
||||||
|
|
@ -28,7 +29,7 @@ in {
|
||||||
libkrb5
|
libkrb5
|
||||||
keyutils
|
keyutils
|
||||||
gperftools
|
gperftools
|
||||||
]);
|
]));
|
||||||
extraEnv = {
|
extraEnv = {
|
||||||
# https://github.com/gloriouseggroll/proton-ge-custom
|
# https://github.com/gloriouseggroll/proton-ge-custom
|
||||||
PROTON_USE_WAYLAND = "1";
|
PROTON_USE_WAYLAND = "1";
|
||||||
|
|
@ -45,6 +46,26 @@ in {
|
||||||
dedicatedServer.openFirewall = true;
|
dedicatedServer.openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: make it so that this wrapper encompasses steam's gamescope
|
||||||
|
# this would make it so we don't have to put the config each time, like this:
|
||||||
|
# gamescope --expose-wayland --adaptive-sync -f -W 1920 -H 1080 -w 1920 -h 1080 -- %command%
|
||||||
|
programs.gamescope = {
|
||||||
|
enable = cfg.gamescope;
|
||||||
|
args = [
|
||||||
|
"--expose-wayland"
|
||||||
|
|
||||||
|
"--adaptive-sync"
|
||||||
|
|
||||||
|
"-f"
|
||||||
|
|
||||||
|
"-W 1920"
|
||||||
|
"-H 1080"
|
||||||
|
|
||||||
|
"-w 1920"
|
||||||
|
"-h 1080"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# enable windows NT sync primitive driver (semaphores, mutexes, etc.)
|
# enable windows NT sync primitive driver (semaphores, mutexes, etc.)
|
||||||
# improves performance on wine 11+ and proton 11+
|
# improves performance on wine 11+ and proton 11+
|
||||||
boot.kernelModules = [ "ntsync" ];
|
boot.kernelModules = [ "ntsync" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue