Changing GDM `gsettings` declaratively

Hello folks! And thanks @jtojnar for the detailed answer above, it helped me figure out a bit more how all of this works under the hood!

I’m slowly migrating to NixOS completely, but I’m stuck at enabling gnome extensions…

I took a look at NixOS Gnome chapter about extensions. Have you updated the doc since your last post in this thread?

  1. I understand that the goal is to deprecate services.xserver.desktopManager.gnome.extraGSettingsOverrides, from some GH issues (e.g. #216291)
  2. The dconf custom database/backend issue is marked as closed/resolved (#54150), is that done?
  3. The only way today to enable gnome extensions is to either use the home-manager’s dconf module or enable them manually (cli/gui, which I try to avoid by philosophy), right?
  4. #321438 seems to focus on schema key/value validation that will come with the gsettings module? Will that allow us to enable extensions too or only change their default values like the overrides today?
  5. Is this #46433 still relevant for us to be able to easily enable the chosen extensions?

What’s remaining to be able to enable and configure gnome extensions declaratively? So I can take a look and try to understand, possibly

The .nix conf I have today that only works for the gnome settings so far, in case I’m doing something wrong (not the extensions) :

{ config, pkgs, lib, ... } :
{
  programs.dconf = {
      enable = true;
      profiles.user.databases = [{
        settings = with lib.gvariant; {
          # Enable installed extensions (doesnt seem to work yet...)
          "org/gnome/shell" = {
            disable-user-extensions = false;
            enabled-extensions =
              builtins.map
                (x: x.extensionUuid)
                (lib.filter (p: p ? extensionUuid) config.environment.systemPackages);
          }
          "org/gnome/desktop/interface" = {
            color-scheme = "prefer-dark";
            gtk-theme = "adw-gtk3-dark";
          };
        };
      }];
    }
}

I do not regret having discovered NixOS, except some issues to make it feel home, otherwise everything looks easier from a configuration point of view so far.

Details about my current installation :

  • NixOS nixos-gnome-24.11.710194.f9f0d5c5380b-x86_64-linux
  • with the default gnome shipped with the .iso
  • no home-manager, nor flake

Cheers!

Potential interesting links :

1 Like