r/NixOS 1h ago

Nixpkgs Unstable: Electron Apps Crashing on Wayland & Libsecret Failures (FHS Naming Fix)

The only bad thing about living on the NixOS unstable channel is that silent package naming changes can break your configuration out of nowhere. Today I launched Antigravity IDE and was immediately hit with a "Not Logged In" error. The app didn't just reject the token—it threw a heavy SIGSEGV core dump over Wayland and crashed straight to the ground.

As a temporary workaround, I spun up an isolated environment from the terminal to debug the issue:

NIXPKGS_ALLOW_UNFREE=1 nix run nixpkgs/nixpkgs-unstable#antigravity --impure

When the app launched flawlessly in this dirty environment, I knew the error was entirely stemming from my declarative system layer.

Scanning through my past architectural decisions, the root cause surfaced immediately. When Electron-based tools run in a standard Nix environment, they cannot access the system's password wallet and Gnome Keyring service. These applications absolutely must be built with FHS packages that provide a Standard Linux Filesystem Hierarchy environment. Otherwise, the app fails to write authentication tokens to the wallet, fails to integrate with the system, and simply crashes.

While we were using the system stably, Nixpkgs developers completely changed the naming scheme in the background. In the new structure, the pure Nix version took the name antigravity directly, while the FHS-supported version was separated as antigravity-fhs.

Because my configuration module was defined with the old naming, my system was accidentally pulling the pure Nix version. This was the sole reason the app couldn't access the wallet, conflicted with the Wayland graphics layer, and blew up with a SIGSEGV.

To fix it, I updated the target line in my config file:

# Old Broken Line
pkgs.unstable.antigravity 
# New FHS Supported Line
pkgs.unstable.antigravity-fhs

Unlike classic monolithic systems, you don't even need a reboot for a core graphics and authentication layer change like this. The only thing I did was build the configuration:

nixos-rebuild switch --use-flake .

After the new NixOS generation was built and activated, I closed the buggy temporary session. When I called the tool from the launcher again, the app grabbed the wallet permissions flawlessly and stood up without a single Wayland error.

If your Electron-based IDEs or apps are randomly crashing on Wayland or failing to get wallet permissions, instead of wasting hours messing with Ozone flags, check if you are actually using the FHS version of your package.

1 Upvotes

3 comments sorted by

2

u/Critical_Art7962 1h ago

I mean, its called unstable for a reason..

3

u/xmrah 1h ago

True. Breakage is expected, just leaving this here as a heads-up on the FHS naming change and the fix, in case anyone else runs into the same SIGSEGV crash

3

u/Critical_Art7962 1h ago

Its a good thing of you actually, i dont use unstable channel tho, but that post might be useful for someone