diff --git a/flake.nix b/flake.nix index 7b238b2..e918cd5 100644 --- a/flake.nix +++ b/flake.nix @@ -149,6 +149,7 @@ imports = [ ./home-manager/browser.nix ./home-manager/gauntlet.nix + ./home-manager/mangohud.nix ./home-manager/plasma.nix ./home-manager/tpm.nix ./home-manager/user.nix diff --git a/home-manager/mangohud.nix b/home-manager/mangohud.nix new file mode 100644 index 0000000..7249f8b --- /dev/null +++ b/home-manager/mangohud.nix @@ -0,0 +1,38 @@ +{ pkgs, ... }: +let + customfonts = pkgs.callPackage ../packages/customfonts.nix { inherit pkgs; }; +in +{ + programs.mangohud = { + enable = true; + enableSessionWide = true; + settings = { + # see https://github.com/flightlessmango/MangoHud/blob/master/data/MangoHud.conf for default config and configuration options + # General + cpu_stats = true; # On by default + cpu_temp = true; + gpu_stats = true; # On by default + gpu_temp = true; + fps = true; # On by default + frametime = true; # On by default + throttling_status = true; # On by default + ram = true; + vram = true; + + # Misc + fps_limit = 144; + show_fps_limit = true; + font_file = "${customfonts}/share/fonts/opentype/ComicCode Nerd Font.otf"; + + # Keybindings + toggle_hud = "Shift_R+F12"; + toggle_hud_position = "Shift_R+F11"; + toggle_preset = "Shift_R+F10"; + toggle_fps_limit = "Shift_L+F1"; + toggle_logging = "Shift_L+F2"; + reload_cfg = "Shift_L+F4"; + upload_log = "Shift_L+F3"; + reset_fps_metrics = "Shift_R+f9"; + }; + }; +} diff --git a/nixos/gaming.nix b/nixos/gaming.nix index 7e785f0..d0df9ce 100644 --- a/nixos/gaming.nix +++ b/nixos/gaming.nix @@ -7,7 +7,6 @@ }; environment.systemPackages = with pkgs; [ gamemode - mangohud (prismlauncher.override { jdks = with pkgs; [ jdk8