diff --git a/roles/gaming/default.nix b/roles/gaming/default.nix index 3a963cc..fb3cce4 100755 --- a/roles/gaming/default.nix +++ b/roles/gaming/default.nix @@ -3,5 +3,6 @@ { imports = [ ./steam.nix + ./mangohud.nix ]; } diff --git a/roles/gaming/mangohud.nix b/roles/gaming/mangohud.nix new file mode 100644 index 0000000..ff6f5df --- /dev/null +++ b/roles/gaming/mangohud.nix @@ -0,0 +1,19 @@ +{ config, ... }: + +{ + # This does the same as enableSessionWide does on the mangohud config + environment.sessionVariables = { MANGOHUD = "1"; MANGOHUD_DLSYM = "1"; }; + + home-manager.users.toast = { config, ... }: + { + programs.mangohud = { + enable = true; + # TODO: fix envvars set by home manager not applying for some reason + # This only works for Vulkan, openGL programs still need the mangohud wrapper + enableSessionWide = true; + settings = { + preset = 4; + }; + }; + }; +}