dconf is the settings backend used by GNOME and GTK applications on Linux. It stores configuration as a binary key-value database organized in filesystem-like paths.
Every setting you change in GNOME Settings, every extension preference, every theme choice — it all ends up written to dconf.
Structure
Settings are organized in hierarchical paths:
/org/gnome/desktop/interface/gtk-theme → "Nordic"
/org/gnome/desktop/interface/color-scheme → "prefer-dark"
/org/gnome/shell/enabled-extensions → ["blur-my-shell@aunetx", ...]
/org/gnome/shell/extensions/vitals/hot-sensors → [...]
GSettings is the API layer on top of dconf. Applications use GSettings to read/write values; dconf is the actual storage engine.
Inspecting Settings
# Read a specific key
gsettings get org.gnome.desktop.interface gtk-theme
# Write a key
gsettings set org.gnome.desktop.interface enable-hot-corners false
# Dump all settings under a path
dconf dump /org/gnome/shell/extensions/just-perfection/
# Dump everything
dconf dump /
# Browse interactively (GUI)
dconf-editorTip
dconf dumpis extremely useful for capturing current settings before making changes, or for understanding what an extension is actually reading.
How NixOS Controls dconf
On NixOS, you can declare dconf values in your configuration so they survive reinstalls, are version-controlled, and apply consistently across users.
There are two mechanisms:
extraGSettingsOverrides
Used in services.desktopManager.gnome:
services.desktopManager.gnome.extraGSettingsOverrides = ''
[org.gnome.desktop.interface]
gtk-theme='Nordic'
color-scheme='prefer-dark'
'';This writes defaults. The user can still override these at runtime by changing settings manually. Think of it as the system’s suggested starting point.
programs.dconf.profiles
Used when you want enforced, declarative settings:
programs.dconf.**profiles**.user.databases = [{
lockAll = true;
settings = {
"org/gnome/shell" = {
enabled-extensions = [ "blur-my-shell@aunetx" "vitals@CoreCoding.com" ];
};
};
}];This writes to a system-level dconf profile that loads before the user’s profile. The user’s own dconf database then layers on top.
What lockAll Does (NixOS-specific)
lockAll = true is a NixOS option that locks every key in the specified settings block, preventing the user from overriding any of them at runtime.
Practical consequences:
- Extension list is locked — enabling an extension in the GNOME Extensions app does nothing; it gets overridden at next session start
- Any new extension must be declared in the NixOS config to be activated
- Any setting in a locked namespace cannot be changed at runtime
Important
lockAlllocks the entire namespace for every path in the settings block — not just the keys you explicitly set. This can unexpectedly freeze settings you did not intend to lock.
Without lockAll, dconf profile settings behave as system defaults that the user can freely override.
Profile Loading Order
dconf loads profiles in order, with later profiles overriding earlier ones:
System profile (/etc/dconf/profile/ — set by the OS or admin)
↓ overlaid by
User profile (~/.config/dconf/user — the user's own changes)
The system profile can mark individual keys as locked, preventing users from overriding them. On standard Linux this is done by placing lock files in /etc/dconf/db/<profile>.d/locks/.
NixOS
NixOS exposes this via
programs.dconf.profileswith alockAlloption that locks every key in the specified settings block — a more blunt instrument than per-key locking.
Common Patterns
# See what is currently controlling a setting (which profile wins)
dconf read /org/gnome/shell/enabled-extensions
# Watch for live changes (useful for debugging)
dconf watch /
# Reset a key to its default
gsettings reset org.gnome.desktop.interface gtk-theme