Skip to content

Commit

Permalink
feat: add steam (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuciael authored May 19, 2024
1 parent 0312ab5 commit 2551462
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
23 changes: 23 additions & 0 deletions modules/desktop/apps/steam.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
lib,
pkgs,
...
}:
with lib;
with lib.my; {
environment = {
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-bin];
};
};
}
3 changes: 3 additions & 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 All @@ -40,6 +41,8 @@ in
# Make chrome and electron apps run native on wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";

xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-gtk];

home-manager.users.${username} = {
# TODO: Move this and media controls to an app config for a player script
home.packages = with pkgs; [playerctl];
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 2551462

Please sign in to comment.