Search code examples
gtkgnome

home-manager how to set gnome dark mode?


I'm trying out home-manager for the first time, and was trying to use it set Gnome to use dark mode. So I set both qt and gtk theme to dark:

qt.enable = true;
qt.style.name = "adwaita-dark";
gtk.enable = true;
gtk.theme.name = "Adwaita-dark";

Which works for most applications, but doesn't for Gnome Files (Nautilus) even though, as far as I know, it's a GTK application. Also does not work after rebooting.

Does anybody know why this is happening? And how to fix it?


Solution

  • I found the dconf.settings, which is what worked! I had to set the following:

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