My needs are fairly simple.
Hyprland (But with a patched portal so Deskflow works)
Zen
Dolphin
Steam
Discord/Signal/Telegram/Etc
Pipewire with some audio feeds to/from VBAN
Deskflow/Synergy
KDEConnect
That’s about it. Simple, other than the patched desktop portal.
I could not get it working.
NixOS kept trying to use the GTK desktop portal for some reason… Dolphin wanted KWallet for auth… And then it kept installing KWallet5 and 6…
Every 2nd time it rebooted there’d be a portal fight and nothing would start.
Clankers helped as much as possible… I ended up with something that /almost/ worked. But it failed every 2nd boot. And when it didn’t work, it REALLY didn’t work. Couldn’t even start a browser. Audio gone. No systray. Waybar would freeze and die.
Vs CachyOS/Arch where this exact setup works flawlessly.
I love the idea of Nix… but this was an absolute nightmare experience.
If anyone wants to see my config, I’ll be happy to share it.
Edit: Got it working. It was a painful road. But it’s working now. Issue was rtkit.
(I’m sure if I’d just been installing KDE or Gnome or whatever it would have been a smoother experience. But I needed patched Hyprland.)
But, possible I was doing it wrong. My first try putting NixOS on my main PC and I was kinda flying dark.
Probably if I’d just used KDE it would have been fine… but I can’t go back… I’m too spoiled by Hyperland’s special workspaces.
bash $> NIX_CONFIG="experimental-features = flakes" nixos-option --flake github:zacpod/nixosconfig#Goliath xdg.portal.extraPortals
Value:
[
<derivation xdg-desktop-portal-hyprland-1.3.12+date=2026-05-18_3449541>
<derivation xdg-desktop-portal-gtk-1.15.3>
]
Default:
[ ]
Type:
list of package
Description:
List of additional portals to add to path. Portals allow interaction
with system, like choosing files or taking screenshots. At minimum,
a desktop portal implementation should be listed. GNOME and KDE already
adds `xdg-desktop-portal-gtk`; and
`xdg-desktop-portal-kde` respectively. On other desktop
environments you probably want to add them yourself.
Declared by:
/nix/store/3a2vdn5i7vd2wl654xs8nb52jf1v6cbh-source/nixos/modules/config/xdg/portal.nix
Defined by:
/nix/store/3a2vdn5i7vd2wl654xs8nb52jf1v6cbh-source/nixos/modules/programs/wayland/hyprland.nix
/nix/store/3a2vdn5i7vd2wl654xs8nb52jf1v6cbh-source/nixos/modules/programs/wayland/hyprland.nix
You can see that the evaluated value of xdg.portal.extraPortals for your config does pull in both the hyprland portal and the fallback gtk portal. I haven’t really messed with changing up my portals so I’m not completely sure what the canonically best way to do it is, nor do I use Deskflow to know why you need a modded portal to use it. I can screen record just fine on Wayland with the default portal setup in OBS/Discord.
Need the patched portal for deskflow/synergy. Ummm… It’s KBM sharing software, so you can use your keyboard and mouse on another computer. Slide the mouse off the left side of the screen and it goes to the next computer.
That’s not in hyprland main yet, so have to run the patch.
And ya - that’s exactly the issue. But I could not make the GTK portal go away. Tried all kinds of stuff and it just always came back.
have you tried xdg.portal.extraPortals = [ pkgs.patched-portal ]?
I think the option is a mergeable types.listOf (docs), so the new portal will get added instead of replacing the value, but hopefully your patched portal gets added to the front of the list and masks the others.
Ok… now that the config is in Github I had Claude take a look. It says it’s pantheon-agent-polkit that has a hard dependency on the GTK portal. Gah. I’ll try to remove that to see if it clears up the issues.
I’ll still need some sort of polkit agent, but I’m sure I can find one that doesn’t rely on GTK.
I still don’t understand how this would work in a multi desktop environment config… like if I had Gnome and Hyprland installed then Hyprland would just be broken because the GTK portal takes over? Is there a way to specify to “Use the hyprland portal in hyprland and the gtk portal in gnome?”
Maybe a script that’ll iterate thru every package to find the culprit… /Something/ is pulling the GTK portal in, and that’s the root of the main issue.
in my very first reply to you, I thought I was being clear that hyperland.nix pulls in wayland-session.nix, which adds xdg-desktop-portal-gtk to xdg.portal.extraPortals, thus both adding a dependency to the gtk portal and adding the portal to the path.
Perhaps I can be clearer by saying: programs.hyperland.enable = true; will pull in the gtk portal. I’m sure there’s a way to disable it, but I don’t think it causes a problem to leave it in.
My best guess is that you probably need something like:
# add your patched portal to the path
xdg.portal.extraPortals = [ pkgs.patched-portal ];
# set the priority polcy -- default patched-portal, then hyprland, final fallback gtk
xdg.portal.config = {
common = {
default = [
"patched-portal"
"hyprland"
"gtk"
];
};
}
(untested, and again I haven’t messed with portals for my config, and this is literally just me reading docs/code tonight, but hopefully it’s helpful as a starting point)
But you’re right… that’s not causing the main issue. Now it’s not showing the gtk portal. But it still boots up broken.
Weirdly, just doing a nixos-rebuild switch fixes it. Just… confusing. Same config, no changes. Boots unusable but nixos-rebuild switch makes everything work as expected.
That DID fix Deskflow, so it works now. Which is a step in the right direction. It would not work when the GTK portal was loaded.
Ok… and when the machine boots, journalctl –user -u xdg-desktop-portal shows:
Jun 02 01:39:53 Goliath systemd[1689]: Starting Portal service… Jun 02 01:39:53 Goliath /nix/store/jkx6q6s45a0xxy34dr13nmqrgsg4hf3q-xdg-desktop-portal-1.20.4/libexec/xdg-desktop-portal[4500]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable Jun 02 01:39:53 Goliath /nix/store/jkx6q6s45a0xxy34dr13nmqrgsg4hf3q-xdg-desktop-portal-1.20.4/libexec/xdg-desktop-portal[4500]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable Jun 02 01:39:53 Goliath /nix/store/jkx6q6s45a0xxy34dr13nmqrgsg4hf3q-xdg-desktop-portal-1.20.4/libexec/xdg-desktop-portal[4500]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
But when I do the nixos-rebuild switch that error doesn’t appear.
rtkit was being brought in by Pipewire, I guess?
But since I hadn’t declared it specifically it wasn’t starting early.
Because it wasn’t starting early, the desktop portal was failing. Or, if there were more than 1 desktop portal then the first/preferred would fail, and the next one would take over. In my case, it would faile over to gtk.
(Which meant that Deskflow and systray didn’t work)
And then when I finally disabled GTK… So there was no other desktop-portal, the machine couldn’t do anything more complex than opening a shell.
(So when I did “nixos-rebuild switch” the rtkit service had time to start up, so switching to the same config worked.)
Adding the above config and specifically bringing in rtkit means that the rtkit service starts earlier, so it’s up before the desktop portal. Portal loads correctly, all is well.
And I could now /probably/ un-disable the gtk portal with no impact.
So. Ok. Not giving up and going back to Cachy yet, it seems!
Display driver crashes when I full-screen some games.
Doesn’t always boot correctly - I think it’s back to portal issues where it’s choosing GTK portal instead of hyprland portal. Usually, just a “nixos-rebuild switch” or a reboot fixes. It’s weirdly unpredictable, tho.
Deskflow still throws errors, even when it works
I’ve given up and gone back to CachyOS for now.
I don’t think this is NixOS’s fault - probably just normal things distro maintainers have to go thru to get a new WM/DE environment working, and since NixOS doesn’t have a Hyprland option at install it’s taking some work to get stable.
But… I’ve gone back to CachyOS for now. Ran out of time to spend futzing with config. I’m sure I’ll go back to the NixOS build - I really do love the concept. Maybe if I install KDE out of the box and then switch over to Hyprland it’ll be more stable.
No, that’s not the case. Switching from one DE to another completely removes the old environment, due to how NixOS works. IMHO if Hyprland doesn’t work for you, you should probably just try one of the big ones like GNOME/KDE… Hyprland can be fiddly at times.
Also, patching portals I’ve never seen anyone do, so that’s just a really weird usecase to me. What are you doing over on CachyOS? Are you writing a custom PKGBUILD with some patch files and installing that?