feat(gaming): generic umu game installer, skill, and desktop entries (#411)

This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-08 14:59:11 +08:00
1 parent efd279c7d1
commit 9e2633f496
14 files changed
+901 -39

No files matched your search

+6 -27
View File
@@ -1,6 +1,5 @@
{
pkgs,
osConfig,
config,
lib,
...
@@ -12,7 +11,7 @@ in
{
options.modules.desktop = {
gaming = {
enable = mkEnableOption "Install Game Suite(steam, lutris, etc)";
enable = mkEnableOption "Enable desktop gaming support";
};
};
@@ -20,19 +19,19 @@ in
# ==========================================================================
# Other Optimizations
# Usage:
# Lutris - enable advanced options, go to the System options -> Command prefix, add: `mangohud`
# Steam - add this as a launch option: `mangohud %command%` / `gamemoderun %command%`
# UMU game launchers use MangoHud by default; set ENABLE_MANGOHUD=0 in their conf to disable.
# Steam - add this as a launch option: `mangohud %command%` / `gamemoderun %command%`
# ==========================================================================
# The nix-config-umu-game skill and the launchers it generates rely on
# umu-launcher, mangohud, winetricks and bbe from this list.
home.packages =
(with pkgs; [
# https://github.com/flightlessmango/MangoHud
# a simple overlay program for monitoring FPS, temperature, CPU and GPU load, and more.
mangohud
# GUI for installing custom Proton versions like GE_Proton
# proton - a Wine distribution aimed at gaming
protonplus
# Script to install various redistributable runtime libraries in Wine.
winetricks
# https://github.com/Open-Wine-Components/umu-launcher
@@ -53,25 +52,5 @@ in
})
]);
# Game launchers for Epic/GOG/Ubisoft/etc. (use Steam + DWProton for common games)
# a GUI game launcher for Steam/GoG/Epic/Ubisoft
# https://lutris.net/games?ordering=-popularity
programs.lutris = {
enable = true;
defaultWinePackage = pkgs.proton-ge-bin;
steamPackage = osConfig.programs.steam.package;
protonPackages = [ pkgs.proton-ge-bin ];
winePackages = with pkgs; [
wineWow64Packages.full
];
extraPackages = with pkgs; [
winetricks
gamescope
gamemode
mangohud
umu-launcher
];
};
};
}
+25 -9
View File
@@ -56,25 +56,41 @@ window-rule {
// Entertainment applications - open in workspace 4
window-rule {
match app-id="steam"
// niri matches app-id anywhere in the string, so a bare "steam" would also
// catch the `steam_app_<GAMEID>` game windows below and hand them
// `open-maximized`, which fights their fullscreen rule. Anchor it so this
// only affects the Steam client window itself.
match app-id="^steam$"
open-on-workspace "4entertainment"
open-maximized true
}
window-rule {
match app-id="steam_app_default"
open-on-workspace "4entertainment"
}
window-rule {
// Games launched through umu/Proton -- including the launchers the
// nix-config-umu-game skill generates -- report `steam_app_<GAMEID>`.
// Without a rule Niri tiles them at the default 50% column width, and a
// DXGI "fullscreen" window larger than the output (a 4K panel here runs at
// scale 1.5, so Niri's logical space is 2560x1440) cannot take over the
// screen by itself.
//
// The launcher shares this app id with the game, so the rule also catches
// its own windows: a helper that is still untitled while it maps, and the
// announcement popup (公告), which on this launcher renders as a pure white
// rectangle. Fullscreening either one buries the UI that opened it, so
// both are excluded here.
match app-id="^steam_app_[0-9]+$"
exclude title="^$"
exclude title="^(公告|Announcement|Notice)$"
open-on-workspace "4entertainment"
open-fullscreen true
}
window-rule {
match app-id="heroic"
open-on-workspace "4entertainment"
}
window-rule {
match app-id="net.lutris.Lutris"
open-on-workspace "4entertainment"
}
window-rule {
match app-id="com.vysp3r.ProtonPlus"
open-on-workspace "4entertainment"
}
window-rule {
// Run anime games on Linux
match app-id="^moe.launcher"