diff --git a/modules/gnome.nix b/modules/gnome.nix index 783a396..f47d924 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -5,11 +5,24 @@ config.lib.stylix.mkEnableTarget "GNOME" true; config.home-manager.sharedModules = - lib.mkIf config.stylix.targets.gnome.enable [{ - dconf.settings."org/gnome/desktop/background" = { - color-shading-type = "solid"; - picture-options = "zoom"; - picture-uri = "file://${config.stylix.image}"; - }; - }]; + if config.stylix.polarity == "dark" + then + lib.mkIf config.stylix.targets.gnome.enable [{ + dconf.settings."org/gnome/desktop/background" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri-dark = "file://${config.stylix.image}"; + }; + dconf.settings."org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }] + else + lib.mkIf config.stylix.targets.gnome.enable [{ + dconf.settings."org/gnome/desktop/background" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = "file://${config.stylix.image}"; + }; + }]; }