Skip to content

Commit

Permalink
enable mangohud
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlet-storm committed Jan 25, 2025
1 parent f66b044 commit 4b65fff
Showing 1 changed file with 31 additions and 29 deletions.
60 changes: 31 additions & 29 deletions config/nixos/steam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,37 @@
"steam-original"
"steam-run"
];
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
programs.steam.localNetworkGameTransfers.openFirewall = true;
hardware.steam-hardware.enable = true;
programs.steam.package = pkgs.steam.override {
buildFHSEnv = (
p:
pkgs.buildFHSEnvBubblewrap (
p
// {
PrivateTmp = true;
unshareCgroup = true;
unsharePid = true;
extraBwrapArgs = p.extraBwrapArgs ++ [
"--tmpfs /home"
"--bind \$HOME/.var/apps \$HOME"
"--ro-bind \$HOME/.config/dconf \$HOME/.config/dconf"
"--ro-bind \$HOME/.config/xsettingsd \$HOME/.config/xsettingsd"
# https://github.com/ValveSoftware/steam-for-linux/issues/10808 ???
"--ro-bind /run/current-system/sw/share/icons /usr/share/icons"
"--chdir \$HOME"
];
}
)
);
extraEnv = {
MANGOHUD = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
package = pkgs.steam.override {
buildFHSEnv = (
p:
pkgs.buildFHSEnvBubblewrap (
p
// {
PrivateTmp = true;
unshareCgroup = true;
unsharePid = true;
extraBwrapArgs = p.extraBwrapArgs ++ [
"--tmpfs /home"
"--bind \$HOME/.var/apps \$HOME"
"--ro-bind \$HOME/.config/dconf \$HOME/.config/dconf"
"--ro-bind \$HOME/.config/xsettingsd \$HOME/.config/xsettingsd"
# https://github.com/ValveSoftware/steam-for-linux/issues/10808 ???
"--ro-bind /run/current-system/sw/share/icons /usr/share/icons"
"--chdir \$HOME"
];
}
)
);
extraEnv = {
MANGOHUD = true;
};
};
extraPackages = with pkgs; [ mangohud ];
extraCompatPackages = [ pkgs.proton-ge-bin ];
};
programs.steam.extraPackages = with pkgs; [ mangohud ];
environment.systemPackages = [ pkgs.bubblewrap ];
hardware.steam-hardware.enable = true;
}

0 comments on commit 4b65fff

Please sign in to comment.