From 30451c48cd114dcb22a89c7e6a2bf35585839b7e Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Sat, 7 Jun 2025 21:32:45 +0300 Subject: [PATCH] feat: add mangohud module --- hosts/andromedae/default.nix | 3 +- modules/home/applications/games/mangohud.nix | 57 ++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 modules/home/applications/games/mangohud.nix diff --git a/hosts/andromedae/default.nix b/hosts/andromedae/default.nix index db61876..3c24be3 100644 --- a/hosts/andromedae/default.nix +++ b/hosts/andromedae/default.nix @@ -65,8 +65,9 @@ in # Home-manager home-manager.users.${defaultUser} = { ataraxia.defaults.role = "desktop"; - ataraxia.theme.catppuccin.enable = true; + ataraxia.programs.mangohud.enable = true; ataraxia.services.modprobed-db.enable = true; + ataraxia.theme.catppuccin.enable = true; wayland.windowManager.hyprland.settings = { # TODO: Remove after flickering is fixed diff --git a/modules/home/applications/games/mangohud.nix b/modules/home/applications/games/mangohud.nix new file mode 100644 index 0000000..de22a8d --- /dev/null +++ b/modules/home/applications/games/mangohud.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + ... +}: +let + inherit (lib) mkEnableOption mkIf; + cfg = config.ataraxia.programs.mangohud; +in +{ + options.ataraxia.programs.mangohud = { + enable = mkEnableOption "Enable mangohud program"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ mangohud ]; + xdg.configFile."MangoHud/MangoHud.conf".text = '' + fps_limit=60 + toggle_fps_limit=F1 + legacy_layout=false + gpu_stats + gpu_temp + gpu_text=GPU + cpu_stats + cpu_temp + cpu_color=2e97cb + cpu_text=CPU + io_color=a491d3 + vram + vram_color=ad64c1 + ram + ram_color=c26693 + fps + engine_version + engine_color=eb5b5b + gpu_color=2e9762 + wine + wine_color=eb5b5b + frame_timing=1 + frametime_color=00ff00 + resolution + vkbasalt + media_player_color=ffffff + time + background_alpha=0.4 + font_size=24 + background_color=020202 + position=top-left + text_color=ffffff + toggle_hud=Shift_R+F12 + toggle_logging=Shift_L+F2 + output_folder=${config.home.homeDirectory} + media_player_name=spotify + ''; + }; +}