cosarara.me

The blog

Nix on ubuntu and webGL

So I switched jobs and got a laptop from the company, and it had ubuntu installed with FDE. Normally I would have done a clean install of arch on it, but I said hey, let’s just give ubuntu a chance.

When it came to setting up the elm language server though, you need a specific version of node and the fight with npm got tiring enough that I decided to go the Nix On Non Nixos route. So I installed nix on ubuntu, ran nix-env -iA a bunch of times, and everything was good in the world.

Then it turned out that most of the time, when something is outdated in the ubuntu repo, it is just easier to install stuff from nix than adding PPAs. That’s how I ended up with neovim, shellcheck installed from nix too.

Enter snap annoyance. Every single day, a big notification saying hey, plz close firefox before 13 days, snap wants to update it but not while it’s running. As I couldn’t find a way to disable the annoying popups, I removed firefox from snap and installed it from nix. But ah, then you have the issue of openGL not working in nix-installed programs. Thankfully nixGL exists, which solves the issue. This laptop has a stupid powerhungry nvidia card, which I disable when I remember to, so I ended up with Exec=nixGLIntel firefox %U in my .local/share/applications/firefox.desktop.

But how, why was webGL still not working? Turns out, upon launching firefox without gl support, it had blacklisted all the things that make it possible for the future. This comment on a github issue gave me the fix. Searching for failureId in about:config and deleting all the things.

Brittle setup much? Maybe. Fun stuff.

—cosarara

Got any comments? Send me an email: blog@cosarara.me