Chromium with wayland switches

Good day,

I’m running Chromium on GNOME Wayland. By default the magical --enable-features=UseOzonePlatform --ozone-platform=wayland flags are not enabled which causes issues when moving between different DPI displays.

Is there a way to add these flags as default ones without creating my own derivations of Chromium (and Google Chrome for that matter)? - I wish we had “chromium-wayland” packages similar to ‘firefox-wayland’.

I tried to creating my own desktop file in ~/.local/share/applications which gnome discovers and launches successfully but still somehow confuses it with the nix-provided desktop item - e.g. when I add it to favorites on the launcher, close the current windows and fire it through the launcher favorite then the nix-provded (stock) desktop icon is used instead.

Thank you in advance.

(chromium.override {
  commandLineArgs = [
1 Like

I think this triggers a rebuild. haizaar specifically asked for a way that doesn’t result in a new Chromium derivation, possibly to avoid a rebuild.

No, this only rebuilds the wrapper script.

1 Like

Thank you! That’s exactly what I was after. Apologies for if my requirements were ambiguous - still a Nix noob. I only mean that I’d like to change default args without forking chromium nixpkg and this suggestion achieves exactly that. It’s also a good reason to read the relevant section of the nix manual again.