Set Gnome Layout options in config

One of the frustrating issues with Gnome on Wayland is that CTRL+BACKSPACE and other keybinds don’t work on Wayland due to this issue: inconsistent interpretation of preserved modifiers with xkbcommon (#570) · Issues · GNOME / gtk · GitLab

A solution is already understood: inconsistent interpretation of preserved modifiers with xkbcommon (#570) · Issues · GNOME / gtk · GitLab

However, when I set it on Gnome, and then rebuild my nix configuration, it seems to overwrite the option I set in Gnome Tweaks.

Does anyone know how I can make this change persistent?

I’m using NixOS on the unstable channel.

Do you perhaps modify your dconf database? Otherwise, it should be persistent – Tweaks just add 'terminate:ctrl_alt_bksp' to the xkb-options key in org.gnome.desktop.input-sources GSettings schema.

Thank you @jtojnar!

I only manually modified it once, when I installed NixOS and pulled my config from my desktop. I only changed system fonts however.

Now, I also noticed now that the issue also occurs when I restart my computer, but my fonts stay as I set. I don’t see any real errors in dmesg nor journalctl -xe either, so I have no idea why this issue occurs.

Can you run dconf-editor org.gnome.desktop.input-sources, try clicking the checkbox in Tweaks and report back if the dconf key changes?

Yep, the related dconf key changes. When I enable the problematic option in Tweaks, it adds ['terminate:ctrl_alt_bksp'] to the dconf value, and then removes it when I disable the option.