fufexan / nix-gaming

Gaming on Nix
MIT License
580 stars 55 forks source link

Star Citizen: Add mangohud #205

Closed pstn closed 1 month ago

pstn commented 1 month ago

This enables mangohud support for star-citizen.

I decided to do it by adding the app to the path and then enabling it via environment variable that is supported by all vulkan apps. Adding it via the command invocation would have meant more complexity since the command isn't the same with and without gamescope, so we'd need 4 different invocations for the whole gamescope and mangohud enabled/disabled matrix.

fufexan commented 1 month ago

@LovingMelody

LovingMelody commented 1 month ago

Unsure if this is truly an appropriate way to setup mangohud especially since it's often installed system wide or through home manager. What benefit does this provide over setting the environment session wide like I do here?

Edit: this otherwise looks fine to me, unable to test thanks to hurricane Helene.

Further thoughts: even if you don't choose to set it session wide I believe just the environment variable which can be set through preCommands should work.

pstn commented 1 month ago

Where is that programs.mangohud config from? I can't find it neither in nixpkgs nor in this repo.

fufexan commented 1 month ago

Looks like a HM option https://nix-community.github.io/home-manager/options.xhtml#opt-programs.mangohud.enable.

LovingMelody commented 1 month ago

Yea it's a home-manager option, just asking what benefit this brings over other options. Seems weird to me to use an override just for mangohud when you can also do this with pre commands

pstn commented 1 month ago

Ah, I didn't see that. Then I agree that it's the better choice to set the options there. Closing this one as superfluous.