How to remove 'xdg-desktop-portal-gtk', where does it come from and why?

Yes. Don’t touch it. stateVersion has absolutely nothing to do with the NixOS version. The numbers mean completely different things, even if they look the same. No, really, see here.


@waffle8946 is talking about the version of the nixpkgs repository the software running on your machine was built from. Since the latest version of nixos-option supports this, and is only available on master, this either means you’re running nixpkgs stable, or have not updated your system in a very long time.

Make sure you update with nix flake update and not nixos-rebuild --upgrade, sudo nix-channel --update or whatever.

2 Likes