mod: added proton manager to gaming module, added alsa to sound, added 32-bit libs to graphics

This commit is contained in:
2026-09-14 19:14:30 -04:00
parent 6cf609acc1
commit 0b4027f0c0
4 changed files with 38 additions and 19 deletions
+24 -11
View File
@@ -76,6 +76,16 @@ in {
enable = lib.mkEnableOption "OpenGL/Vulkan overlay tool shown in games presenting FPS, CPU/GPU/memory utilization, load, etc.";
};
proton = {
enable = lib.mkEnableOption "Proton compatibility tool management";
manager = lib.mkOption {
type = lib.types.enum ["protonplus" "protonup-qt"];
default = "protonup-qt";
description = "Graphical Proton compatibility tool manager to install";
};
};
lutris = {
enable = lib.mkEnableOption "Lutris game manager and launcher";
package = lib.mkOption {
@@ -93,14 +103,7 @@ in {
};
};
# Compatibility layers for Lutris
compatibility = {
protonSupport = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable Proton-like compatibility layers for Lutris";
};
extraTools = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [];
@@ -153,14 +156,27 @@ in {
archon = {
enable = lib.mkEnableOption "Archon from NUR";
};
opengoal = {
enable = lib.mkEnableOption "OpenGOAL, a game engine used in a certain PlayStation 2 franchise";
};
};
config = let
agl = cfg.aagl;
nurPkgs = import "${nur.outPath}/pkgs" { inherit pkgs; };
protonManager = {
protonplus = pkgs.protonplus;
protonup-qt = pkgs.protonup-qt;
}.${cfg.proton.manager};
in {
programs.steam = lib.mkIf cfg.steam.enable {
enable = true;
extraPackages = with pkgs; [
gamescope
gamemode
];
remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers;
};
@@ -214,13 +230,10 @@ in {
cfg.lutris.wine.package
pkgs.winetricks
]) ++
(lib.optionals cfg.lutris.compatibility.protonSupport [
pkgs.protonup-ng
pkgs.protonup-qt
]) ++
cfg.lutris.compatibility.extraTools ++
cfg.lutris.extraPackages
)) ++
(lib.optionals cfg.proton.enable [protonManager]) ++
(lib.optionals cfg.minecraft.enable [pkgs.prismlauncher]) ++
(lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++
(lib.optionals cfg.vintage-story.enable [nurPkgs.vintage-story]) ++
+5 -4
View File
@@ -43,6 +43,11 @@ in {
vulkan-tools
mesa-demos
];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
}
(mkIf (cfg.gpuVendor == "nvidia") {
@@ -61,9 +66,6 @@ in {
(mkIf (cfg.gpuVendor == "amd") {
services.xserver.videoDrivers = ["amdgpu"];
# hardware.graphics.extraPackages = with pkgs; [
# amdvlk
# ];
environment.systemPackages = with pkgs; [
radeontop
];
@@ -82,7 +84,6 @@ in {
environment.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
};
})
+4 -4
View File
@@ -3,7 +3,6 @@
pkgs,
userName,
aagl,
nur,
...
}: let
flatpakPackages = [
@@ -114,15 +113,16 @@ in {
gamemode.enable = true;
gamescope.enable = true;
mangohud.enable = true;
proton = {
enable = true;
manager = "protonplus";
};
lutris = {
enable = true;
wine = {
enable = true;
package = pkgs.wine-staging;
};
compatibility = {
protonSupport = true;
};
};
ffxiv.enable = true;
+5
View File
@@ -3,6 +3,11 @@
services.pipewire = {
enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
environment.systemPackages = with pkgs; [