diff --git a/hardware/steam.nix b/hardware/steam.nix new file mode 100644 index 0000000..024716f --- /dev/null +++ b/hardware/steam.nix @@ -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; +} diff --git a/home-pc.nix b/home-pc.nix index fa53fc6..4f4deb6 100644 --- a/home-pc.nix +++ b/home-pc.nix @@ -4,6 +4,7 @@ imports = [ ./hardware/base.nix ./hardware/gpu-nvidia.nix + ./hardware/steam.nix ./hardware/ledger.nix ./system ./desktop diff --git a/home/felschr.nix b/home/felschr.nix index 972a880..962507f 100644 --- a/home/felschr.nix +++ b/home/felschr.nix @@ -14,6 +14,7 @@ ./browsers ./planck.nix ./ausweisapp.nix + ./steam.nix ]; services.gammastep = { @@ -74,7 +75,6 @@ anki # gaming - steam lutris # privacy diff --git a/home/steam.nix b/home/steam.nix new file mode 100644 index 0000000..4a9b099 --- /dev/null +++ b/home/steam.nix @@ -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 ]; }