modify mangohud.nix to allow quick switch of config

This commit is contained in:
Elec3137 2026-02-13 10:58:10 -08:00
commit fc735ecfd2

View file

@ -67,9 +67,11 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
environment.etc."${name}.conf".text = cfg.extraConfig;
environment.variables = { environment.variables = {
MANGOHUD = 1; # enables mangohud by default on all vulkan games MANGOHUD = 1; # enables mangohud by default on all vulkan games
MANGOHUD_CONFIGFILE = pkgs.writeText "MangoHud.conf" cfg.extraConfig; MANGOHUD_CONFIGFILE = "/etc/${name}.conf";
}; };
}; };
} }