What happened to programs.dconf in home-manager?

Hi, I’m currently trying to figure out how to dark-theme gtk4 apps (like nautiles) like I’ve done for gtk3-2.

I thought it was possible by using dconf, but apparently programs.dconf.enable doesn’t exist anymore.

However it is still refered in man home-configuration.nix or programs.dconf.enable - MyNixOS.

What happened ?

It exists but is not set to visible, and is enabled by default.

programs.dconf.enable has to be set in the NixOS configuration.

3 Likes

Ok thanks. And do you know if this is the way to enable dark-theme for gtk4 apps (especially nautilus)

dconf = {
  settings = {
    "org/gnome/desktop/interface" = {
	gtk-theme = "Adwaita-dark";
	color-scheme = "prefer-dark";
    };
  };
};

gtk = {
  enable = true;
  theme = {
    name = "Adwaita-dark";
    package = pkgs.gnome.gnome-themes-extra;
  };
};

qt = {
  enable = true;
  platformTheme.name = "Adwaita-dark";
  style = {
    name = "Adwaita-dark";
    package = pkgs.adwaita-qt;
  };
};

EDIT

I’ve found the dark theme problem. Gtk4, listen to gsettings through the gtk portal. Hence, I’ve added it to my home.nix configuration

xdg.portal = {
  enable = true;
  extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
  configPackages = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
};

https://wiki.archlinux.org/title/XDG_Desktop_Portal

1 Like