Skip to content

Commit

Permalink
feat: add steam
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuciael committed May 19, 2024
1 parent 1868e11 commit 6f2d917
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
27 changes: 27 additions & 0 deletions modules/desktop/apps/steam.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.my; {
environment = {
sessionVariables = {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = makeSearchPathOutput "steamcompattool" "" config.programs.steam.extraCompatPackages;
};
systemPackages = with pkgs; [mangohud steam-run];
};

programs = {
gamescope.enable = true;
gamemode.enable = true;
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
gamescopeSession.enable = true;
extraCompatPackages = with pkgs; [proton-ge-nostale proton-ge-bin];
};
};
}
1 change: 1 addition & 0 deletions modules/desktop/wm/hyprland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ in
"gtk"
"qt"
"grimblast"
"steam"
];

extraConfig = {
Expand Down
13 changes: 10 additions & 3 deletions modules/hardware/amdgpu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ in {
};

config = mkIf (cfg.enable) {
services.xserver.videoDrivers = mkIf config.services.xserver.enable ["amdgpu"];

hardware.enableRedistributableFirmware = true;
services.xserver.videoDrivers = ["amdgpu"];
boot.initrd.kernelModules = ["amdgpu"];

hardware = {
enableRedistributableFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
};
};
}
5 changes: 4 additions & 1 deletion modules/hardware/layout.nix
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ in {
})
cfg.layout;
in {
deviceSection = concatLines (builtins.map (x: ''Option "monitor-${x.layout.monitor.xorg}" "${x.name}"'') heads);
deviceSection = concatLines (
(builtins.map (x: ''Option "monitor-${x.layout.monitor.xorg}" "${x.name}"'') heads)
++ [''Option "DRI" "3"'']
);
extraConfig = with lib; let
mkMonitorSection = prev: curr:
(singleton {
Expand Down

0 comments on commit 6f2d917

Please sign in to comment.