feat(steam): add compatibility utils
This commit is contained in:
parent
b62ca97ccb
commit
ccde8e238e
4 changed files with 85 additions and 17 deletions
|
@ -2,6 +2,7 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -9,34 +10,43 @@ let
|
|||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-gaming.nixosModules.platformOptimizations
|
||||
];
|
||||
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
steam = {
|
||||
enable = lib.mkEnableOption "Enable Steam.";
|
||||
enableGamescope = lib.mkEnableOption "Enable the gamescope compositor.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.steam.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
protontricks.enable = true;
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
protontricks.enable = true;
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
||||
platformOptimizations.enable = true;
|
||||
};
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
gamemode.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
steam-run
|
||||
wineWowPackages.stable
|
||||
wine64
|
||||
wineWowPackages.waylandFull
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.steam.enableGamescope {
|
||||
programs.steam.gamescopeSession.enable = true;
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue