# How to apply gsettings in NixOS?

**URL:** https://discourse.nixos.org/t/how-to-apply-gsettings-in-nixos/54637
**Category:** Help
**Created:** [October 20, 2024, 2:53pm UTC](https://discourse.nixos.org/t/how-to-apply-gsettings-in-nixos/54637 "2024-10-20T14:53:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vivy](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/v/bbce88/32.png) [@vivy](https://discourse.nixos.org/u/vivy)
#### Post date: [October 20, 2024, 2:53pm UTC](https://discourse.nixos.org/t/how-to-apply-gsettings-in-nixos/54637/1 "2024-10-20T14:53:33Z")

</div>

The underlying problem is that I want to disable “Force Wait” gnome timeout option as described in the [reddit comment](https://www.reddit.com/r/gnome/comments/hzkuwx/comment/fzo32xo/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)  
“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.

```auto
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 '';

```

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [October 20, 2024, 4:58pm UTC](https://discourse.nixos.org/t/how-to-apply-gsettings-in-nixos/54637/2 "2024-10-20T16:58:51Z")

</div>

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

> **[data/org.gnome.mutter.gschema.xml.in ·...](https://gitlab.gnome.org/GNOME/mutter/-/blob/cb34fafd5727db5684d32b462368c34adf89cca3/data/org.gnome.mutter.gschema.xml.in#L157)**
>
> A Wayland display server and X11 window manager and compositor library.

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

---

<div class="post-metadata">

### Author: ![vivy](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/v/bbce88/32.png) [@vivy](https://discourse.nixos.org/u/vivy)
#### Post date: [October 21, 2024, 6:14am UTC](https://discourse.nixos.org/t/how-to-apply-gsettings-in-nixos/54637/3 "2024-10-21T06:14:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![vivy](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/v/bbce88/32.png) [@vivy](https://discourse.nixos.org/u/vivy)
#### Post date: [November 12, 2024, 10:09pm UTC](https://discourse.nixos.org/t/how-to-apply-gsettings-in-nixos/54637/4 "2024-11-12T22:09:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![DeKoile](https://discourse.nixos.org/user_avatar/discourse.nixos.org/dekoile/32/30842_2.png) [@DeKoile](https://discourse.nixos.org/u/DeKoile)
#### Post date: [February 4, 2025, 6:21pm UTC](https://discourse.nixos.org/t/how-to-apply-gsettings-in-nixos/54637/5 "2025-02-04T18:21:58Z")

</div>

Hi,  
I’m also struggling to apply settings to gnome-Apps.  
Based on [this posting](https://discourse.nixos.org/t/changing-gdm-gsettings-declaratively/49579/2), I created this:

```auto
  programs.dconf.profiles.user = {
    databases = [{
      lockAll = true;
      settings = {
        "org/maliit/keyboard/maliit" = {
          enabled-languages = "['de']";
          theme = "BreezeDark";
        };
        "org/gnome/desktop/wm/preferences" = {
          button-layout = "";
        };
      };
    }];
  };

```

the button-layout configuration is working, but my Maliit-settings seem to be ignored.  
Has anyone an idea, what I’m doing wrong?
