feat: update steam config

This commit is contained in:
Felix Schröter 2021-03-04 14:45:54 +01:00
parent 82181a8d8b
commit 8bf3bbebd0
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58
4 changed files with 27 additions and 1 deletions

13
hardware/steam.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
hardware.opengl = {
# this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
enable = true;
driSupport = true;
driSupport32Bit = true;
};
# optionally enable 32bit pulseaudio support if pulseaudio is enabled
hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
}

View file

@ -4,6 +4,7 @@
imports = [
./hardware/base.nix
./hardware/gpu-nvidia.nix
./hardware/steam.nix
./hardware/ledger.nix
./system
./desktop

View file

@ -14,6 +14,7 @@
./browsers
./planck.nix
./ausweisapp.nix
./steam.nix
];
services.gammastep = {
@ -74,7 +75,6 @@
anki
# gaming
steam
lutris
# privacy

12
home/steam.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, pkgs, nixosConfig, ... }:
let
steam = pkgs.steam.override {
extraLibraries = pkgs:
with nixosConfig.hardware.opengl;
if pkgs.hostPlatform.is64bit then
[ package ] ++ extraPackages
else
[ package32 ] ++ extraPackages32;
};
in { home.packages = [ steam steam.run ]; }