fps limiting in mangohud

This commit is contained in:
2025-08-23 20:19:28 +02:00
parent 0aee52edb2
commit 6ef84bc712
+15 -3
View File
@@ -1,13 +1,25 @@
{ config, lib, pkgs, osConfig, ... }: { config, lib, pkgs, osConfig, ... }:
{ let
# https://raw.githubusercontent.com/flightlessmango/MangoHud/master/data/MangoHud.conf
mangohudConfig = pkgs.writeText "mangohud.conf" ''
fps_limit=0,60,90,120,240
show_fps_limit
'';
mangohudWrapped = (pkgs.runCommand
"mangohud"
{ nativeBuildInputs = [ pkgs.makeWrapper ]; }
"makeWrapper ${pkgs.mangohud}/bin/mangohud $out/bin/mangohud --set MANGOHUD_CONFIGFILE ${mangohudConfig}"
);
in {
options.lumpiastyHome.gaming = lib.mkEnableOption "Gaming account"; options.lumpiastyHome.gaming = lib.mkEnableOption "Gaming account";
config = lib.mkIf config.lumpiastyHome.gaming { config = lib.mkIf config.lumpiastyHome.gaming {
programs.lutris = { programs.lutris = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
mangohud mangohudWrapped
gamescope gamescope
]; ];
}; };
@@ -18,7 +30,7 @@
]; ];
})) }))
(steam.override { (steam.override {
extraPkgs = pkgs': with pkgs'; [ mangohud gamescope ]; extraPkgs = pkgs': with pkgs'; [ mangohudWrapped gamescope ];
}) })
]; ];
}; };