Skip to content

Instantly share code, notes, and snippets.

@iamevn
Last active October 1, 2025 10:03
Show Gist options
  • Select an option

  • Save iamevn/8045cfb1682249bd36b478008cbed7a8 to your computer and use it in GitHub Desktop.

Select an option

Save iamevn/8045cfb1682249bd36b478008cbed7a8 to your computer and use it in GitHub Desktop.
disable pesky game mode popup using nix on macos
{ pkgs, ... }:
let
# disable game mode for mpv
mpv-unwrapped = pkgs.mpv-unwrapped.overrideAttrs (attrs: {
postPatch = (attrs.postPatch or "") + ''
substituteInPlace TOOLS/osxbundle/mpv.app/Contents/Info.plist \
--replace-fail 'public.app-category.games' 'public.app-category.video'
'';
});
mpv-no-game-mode = pkgs.mpv.override {
mpv = mpv-unwrapped;
};
in {
# use mpv-no-game-mode wherever you would be specifying packages, e.g.
packages = with pkgs; [
cowsay
intercal
mpv-no-game-mode
sl
toilet
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment