From e844d29eaec24bb12f799bcabb458bb658813273 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 30 Jun 2023 16:43:30 +0200 Subject: [PATCH] Gaming: enable mangohud --- roles/gaming/default.nix | 1 + roles/gaming/mangohud.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 roles/gaming/mangohud.nix 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; + }; + }; + }; +}