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."; 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 = { lutris = {
enable = lib.mkEnableOption "Lutris game manager and launcher"; enable = lib.mkEnableOption "Lutris game manager and launcher";
package = lib.mkOption { package = lib.mkOption {
@@ -93,14 +103,7 @@ in {
}; };
}; };
# Compatibility layers for Lutris
compatibility = { compatibility = {
protonSupport = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable Proton-like compatibility layers for Lutris";
};
extraTools = lib.mkOption { extraTools = lib.mkOption {
type = lib.types.listOf lib.types.package; type = lib.types.listOf lib.types.package;
default = []; default = [];
@@ -153,14 +156,27 @@ in {
archon = { archon = {
enable = lib.mkEnableOption "Archon from NUR"; enable = lib.mkEnableOption "Archon from NUR";
}; };
opengoal = {
enable = lib.mkEnableOption "OpenGOAL, a game engine used in a certain PlayStation 2 franchise";
};
}; };
config = let config = let
agl = cfg.aagl; agl = cfg.aagl;
nurPkgs = import "${nur.outPath}/pkgs" { inherit pkgs; }; nurPkgs = import "${nur.outPath}/pkgs" { inherit pkgs; };
protonManager = {
protonplus = pkgs.protonplus;
protonup-qt = pkgs.protonup-qt;
}.${cfg.proton.manager};
in { in {
programs.steam = lib.mkIf cfg.steam.enable { programs.steam = lib.mkIf cfg.steam.enable {
enable = true; enable = true;
extraPackages = with pkgs; [
gamescope
gamemode
];
remotePlay.openFirewall = cfg.steam.firewall.remotePlay; remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers; localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers;
}; };
@@ -214,13 +230,10 @@ in {
cfg.lutris.wine.package cfg.lutris.wine.package
pkgs.winetricks pkgs.winetricks
]) ++ ]) ++
(lib.optionals cfg.lutris.compatibility.protonSupport [
pkgs.protonup-ng
pkgs.protonup-qt
]) ++
cfg.lutris.compatibility.extraTools ++ cfg.lutris.compatibility.extraTools ++
cfg.lutris.extraPackages cfg.lutris.extraPackages
)) ++ )) ++
(lib.optionals cfg.proton.enable [protonManager]) ++
(lib.optionals cfg.minecraft.enable [pkgs.prismlauncher]) ++ (lib.optionals cfg.minecraft.enable [pkgs.prismlauncher]) ++
(lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++ (lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++
(lib.optionals cfg.vintage-story.enable [nurPkgs.vintage-story]) ++ (lib.optionals cfg.vintage-story.enable [nurPkgs.vintage-story]) ++
+5 -4
View File
@@ -43,6 +43,11 @@ in {
vulkan-tools vulkan-tools
mesa-demos mesa-demos
]; ];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
} }
(mkIf (cfg.gpuVendor == "nvidia") { (mkIf (cfg.gpuVendor == "nvidia") {
@@ -61,9 +66,6 @@ in {
(mkIf (cfg.gpuVendor == "amd") { (mkIf (cfg.gpuVendor == "amd") {
services.xserver.videoDrivers = ["amdgpu"]; services.xserver.videoDrivers = ["amdgpu"];
# hardware.graphics.extraPackages = with pkgs; [
# amdvlk
# ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
radeontop radeontop
]; ];
@@ -82,7 +84,6 @@ in {
environment.sessionVariables = { environment.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
QT_QPA_PLATFORM = "wayland"; QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
}; };
}) })
+4 -4
View File
@@ -3,7 +3,6 @@
pkgs, pkgs,
userName, userName,
aagl, aagl,
nur,
... ...
}: let }: let
flatpakPackages = [ flatpakPackages = [
@@ -114,15 +113,16 @@ in {
gamemode.enable = true; gamemode.enable = true;
gamescope.enable = true; gamescope.enable = true;
mangohud.enable = true; mangohud.enable = true;
proton = {
enable = true;
manager = "protonplus";
};
lutris = { lutris = {
enable = true; enable = true;
wine = { wine = {
enable = true; enable = true;
package = pkgs.wine-staging; package = pkgs.wine-staging;
}; };
compatibility = {
protonSupport = true;
};
}; };
ffxiv.enable = true; ffxiv.enable = true;
+5
View File
@@ -3,6 +3,11 @@
services.pipewire = { services.pipewire = {
enable = true; enable = true;
pulse.enable = true; pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [