From 1123250f72fac7bfce4b2fa09fbf8853f8041846 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 12 Nov 2023 22:15:48 +0100 Subject: [PATCH] fix(graphical): prefer dark scheme, fixes nautilus scheme https://discourse.nixos.org/t/how-to-enable-global-dark-mode-using-home-manager-in-nixos/28348 --- modules/graphical/default.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index 38f64467..e0159378 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -63,8 +63,6 @@ in { style = "gtk2"; }; - # Required for running Gnome apps outside the Gnome DE, see https://nixos.wiki/wiki/GNOME#Running_GNOME_programs_outside_of_GNOME - programs.dconf.enable = true; services.udev.packages = with pkgs; [gnome3.gnome-settings-daemon]; # Enable Sushi, a quick previewer for nautilus services.gnome.sushi.enable = true; @@ -117,6 +115,17 @@ in { xdg.configFile."waybar/colorscheme.css".source = ./.config/waybar/colorscheme.css; xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg; + # Required for running Gnome apps outside the Gnome DE, see + # https://nixos.wiki/wiki/GNOME#Running_GNOME_programs_outside_of_GNOME + dconf = { + enable = true; + settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + }; + gtk = { enable = true; font.name = "Lato"; @@ -136,6 +145,14 @@ in { gtk-xft-rgba = "rgb"; gtk-application-prefer-dark-theme = "true"; }; + + gtk4.extraConfig = { + gtk-xft-antialias = "1"; + gtk-xft-hinting = "1"; + gtk-xft-hintstyle = "hintfull"; + gtk-xft-rgba = "rgb"; + gtk-application-prefer-dark-theme = "true"; + }; }; xresources.extraConfig = builtins.readFile ./.Xdefaults;