Add MangoHud module and enable it on hosts
Introduce a new `mangohud.nix` module with sensible defaults, import it in `modules/home/default.nix`, and add a `mangohud.enable` flag to the host configurations (enabled for desktop and laptop, disabled for the default host). Comment out the default Gamescope arguments in `modules/core/steam.nix` and add a reference command line that includes the MangoHud flag.
This commit is contained in:
@@ -35,6 +35,7 @@ _: {
|
|||||||
Gaming
|
Gaming
|
||||||
*/
|
*/
|
||||||
lutris.enable = false; # Lutris: an open gaming platform
|
lutris.enable = false; # Lutris: an open gaming platform
|
||||||
|
mangohud.enable = true; # MangoHud: Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Media recording and streaming
|
Media recording and streaming
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ _: {
|
|||||||
Gaming
|
Gaming
|
||||||
*/
|
*/
|
||||||
lutris.enable = false; # Lutris: an open gaming platform
|
lutris.enable = false; # Lutris: an open gaming platform
|
||||||
|
mangohud.enable = true; # MangoHud: Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Media recording and streaming
|
Media recording and streaming
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ _: {
|
|||||||
Gaming
|
Gaming
|
||||||
*/
|
*/
|
||||||
lutris.enable = false; # Lutris: an open gaming platform
|
lutris.enable = false; # Lutris: an open gaming platform
|
||||||
|
mangohud.enable = false; # MangoHud: Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Media recording and streaming
|
Media recording and streaming
|
||||||
|
|||||||
+10
-8
@@ -18,10 +18,10 @@
|
|||||||
dedicatedServer.openFirewall = true;
|
dedicatedServer.openFirewall = true;
|
||||||
gamescopeSession = lib.mkIf config.gamescope.enable {
|
gamescopeSession = lib.mkIf config.gamescope.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
args = [
|
# args = [
|
||||||
"--rt"
|
# "--rt"
|
||||||
"--expose-wayland"
|
# "--expose-wayland"
|
||||||
];
|
# ];
|
||||||
};
|
};
|
||||||
extraCompatPackages = [pkgs.proton-ge-bin];
|
extraCompatPackages = [pkgs.proton-ge-bin];
|
||||||
};
|
};
|
||||||
@@ -29,10 +29,10 @@
|
|||||||
gamescope = lib.mkIf config.gamescope.enable {
|
gamescope = lib.mkIf config.gamescope.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
capSysNice = true;
|
capSysNice = true;
|
||||||
args = [
|
# args = [
|
||||||
"--rt"
|
# # "--rt"
|
||||||
"--expose-wayland"
|
# # "--expose-wayland"
|
||||||
];
|
# ];
|
||||||
};
|
};
|
||||||
|
|
||||||
gamemode = lib.mkIf config.gamemode.enable {
|
gamemode = lib.mkIf config.gamemode.enable {
|
||||||
@@ -41,3 +41,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
# gamescope -W 1920 -H 1080 -r 144 --force-grab-cursor -f --mangoapp --rt --expose-wayland --
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ _: {
|
|||||||
./gtk.nix
|
./gtk.nix
|
||||||
./kdeConnect.nix
|
./kdeConnect.nix
|
||||||
./lutris.nix
|
./lutris.nix
|
||||||
|
./mangohud.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./obs-studio.nix
|
./obs-studio.nix
|
||||||
./ollama.nix
|
./ollama.nix
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options.mangohud.enable = lib.mkEnableOption "MangoHud";
|
||||||
|
|
||||||
|
config = lib.mkIf config.mangohud.enable {
|
||||||
|
programs.mangohud = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mangohud;
|
||||||
|
settings = lib.mkForce {
|
||||||
|
position = "top-right";
|
||||||
|
background_alpha = 0.4;
|
||||||
|
font_size = 18;
|
||||||
|
round_corners = 8;
|
||||||
|
no_display = 0;
|
||||||
|
|
||||||
|
gpu_color = "2e9ef4";
|
||||||
|
cpu_color = "39d353";
|
||||||
|
vram_color = "ad3aff";
|
||||||
|
ram_color = "c0c0c0";
|
||||||
|
engine_color = "eb5454";
|
||||||
|
frametime_color = "e8c446";
|
||||||
|
text_color = "ffffff";
|
||||||
|
background_color = "020202";
|
||||||
|
media_player_color = "ffffff";
|
||||||
|
|
||||||
|
fps_color_change = 1;
|
||||||
|
fps_color = "39d353,e8c446,eb5454";
|
||||||
|
fps_value = "60,30";
|
||||||
|
|
||||||
|
fps = 1;
|
||||||
|
fps_only = 0;
|
||||||
|
|
||||||
|
gpu_stats = 1;
|
||||||
|
gpu_load_change = 1;
|
||||||
|
gpu_load_value = "60,90";
|
||||||
|
gpu_load_color = "39d353,e8c446,eb5454";
|
||||||
|
gpu_temp = 1;
|
||||||
|
gpu_core_clock = 1;
|
||||||
|
gpu_mem_clock = 0;
|
||||||
|
gpu_power = 1;
|
||||||
|
gpu_name = 1;
|
||||||
|
vram = 1;
|
||||||
|
|
||||||
|
cpu_stats = 1;
|
||||||
|
cpu_load_change = 1;
|
||||||
|
cpu_load_value = "60,90";
|
||||||
|
cpu_load_color = "39d353,e8c446,eb5454";
|
||||||
|
cpu_temp = 1;
|
||||||
|
cpu_mhz = 1;
|
||||||
|
core_load = 0;
|
||||||
|
|
||||||
|
ram = 1;
|
||||||
|
|
||||||
|
frametime = 1;
|
||||||
|
frame_timing = 1;
|
||||||
|
histogram = 0;
|
||||||
|
|
||||||
|
engine_version = 1;
|
||||||
|
vulkan_driver = 1;
|
||||||
|
arch = 0;
|
||||||
|
|
||||||
|
fps_limit = 0;
|
||||||
|
toggle_hud = "Shift_R+F12";
|
||||||
|
toggle_fps_limit = "Shift_L+F1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user