diff --git a/provision/modules/gaming/default.nix b/provision/modules/gaming/default.nix index 0b20c172..59f24668 100644 --- a/provision/modules/gaming/default.nix +++ b/provision/modules/gaming/default.nix @@ -1,4 +1,8 @@ { ... }: { - imports = [ ./emulation.nix ./minecraft.nix ./steam.nix ]; + imports = [ + ./emulation.nix + ./minecraft.nix + ./steam.nix + ]; } diff --git a/provision/modules/gaming/emulation.nix b/provision/modules/gaming/emulation.nix index b7285cbf..0090a655 100644 --- a/provision/modules/gaming/emulation.nix +++ b/provision/modules/gaming/emulation.nix @@ -4,8 +4,6 @@ let cfg = config.modules.gaming.emulation; in { options.modules.gaming.emulation.enable = lib.mkEnableOption "emulation"; config = lib.mkIf cfg.enable { - - environment.systemPackages = with pkgs; [ ryujinx # Fuck Nintendo! sudachi # Nintendo Switch emulator written in C++. @@ -24,6 +22,7 @@ in { }) ]; + # Provide dumped keys for switch emulation age.secrets."emu/switch/prod.keys" = { file = ../../secrets/emu/switch/prod.keys.age; owner = "${user}"; diff --git a/provision/modules/gaming/minecraft.nix b/provision/modules/gaming/minecraft.nix index 9508a534..bc61e113 100644 --- a/provision/modules/gaming/minecraft.nix +++ b/provision/modules/gaming/minecraft.nix @@ -5,8 +5,8 @@ in { options.modules.gaming.minecraft.enable = lib.mkEnableOption "minecraft"; config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ - prismlauncher # Launcher for Prism, a web application framework. jdk17 # Java Development Kit (JDK) version 17. + prismlauncher # Launcher for Prism, a web application framework. ]; }; } diff --git a/provision/modules/gaming/steam.nix b/provision/modules/gaming/steam.nix index 0edc7254..ab1ea49a 100644 --- a/provision/modules/gaming/steam.nix +++ b/provision/modules/gaming/steam.nix @@ -4,22 +4,19 @@ let cfg = config.modules.gaming.steam; in { options.modules.gaming.steam.enable = lib.mkEnableOption "steam"; config = lib.mkIf cfg.enable { - hardware.graphics.enable = true; # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932 - - # optionally enable 32bit pulseaudio support if pulseaudio is enabled - hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable; - - hardware.steam-hardware.enable = true; - # Digital distribution platform for purchasing and playing video games. - programs.steam = { - enable = true; - # Workaround from: https://github.com/NixOS/nixpkgs/issues/236561 - package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; }; - }; environment.systemPackages = with pkgs; [ steamtinkerlaunch # Launcher and optimization tool for Steam games. gamescope # Utility for running games using Valve's Steam Play compatibility layer with improved performance and compatibility. - mangohud + mangohud # Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. ]; + + hardware.graphics.enable = true; # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932 + hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable; # Enable 32bit pulseaudio support if pulseaudio is enabled + hardware.steam-hardware.enable = true; + + programs.steam = { + enable = true; + package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; }; # Workaround from: https://github.com/NixOS/nixpkgs/issues/236561 + }; }; }