How to apply gsettings in NixOS?

The underlying problem is that I want to disable “Force Wait” gnome timeout option as described in the reddit comment
“gsettings set org.gnome.mutter check-alive-timeout 0”

I tried 2 changes, but both do not seem to have the effect. The configuration builds fine though.

311   programs.dconf.profiles.user = {
312     databases = [{
313       settings = {
314         "org/gnome/desktop/interface" = {
315           color-scheme = "prefer-dark";
316           clock-format = "12h";
317           clock-show-weekday = true;
318         };
319         "org/gnome/mutter" = {
320           check-alive-timeout = lib.gvariant.mkInt32 60000;
321         };
322       };
323     }];
324   };
325   services.xserver.desktopManager.gnome.extraGSettingsOverrides = ''
326     [org.gnome.mutter]
327     check-alive-timeout=60000
328   '';

The type of the settings schema is uint32 so you need to use mkUint32:

extraGSettingsOverrides only sets the default so if you use programs.dconf.profiles.user, the former will have no effect.

1 Like

I tried both, extraGsettingsOverrides without programs.dconf... and lib.mkUint32 with programs.dconf.profile.user, both didn’t work.

I’m using ssh -X another_user@localhost and running firefox via selenium while I face the “force quit” / “wait” issue even when all the windows are responsive.

Is there a way to query the current value of check-alive-timeout? Since the schema is different, I don’t see org.gnome.mutter in my dconf.

It seems I needed to do
services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome3.mutter ];
to first bring mutter schema to gsettings.
After that I can at least modify the setting from dconf-editor and see it taking effect.