diff --git a/modules/gnome.nix b/modules/gnome.nix index 783751eb..cea34747 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -1,29 +1,25 @@ { pkgs, config, lib, ... }: +with lib; + { options.stylix.targets.gnome.enable = config.lib.stylix.mkEnableTarget "GNOME" true; - config = lib.mkIf config.stylix.targets.gnome.enable { - home-manager.sharedModules = - if config.stylix.polarity == "dark" - then [{ - 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 [{ - dconf.settings."org/gnome/desktop/background" = { - color-shading-type = "solid"; - picture-options = "zoom"; - picture-uri = "file://${config.stylix.image}"; - }; - }]; + config = mkIf config.stylix.targets.gnome.enable { + home-manager.sharedModules = [{ + dconf.settings."org/gnome/desktop/background" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = "file://${config.stylix.image}"; + picture-uri-dark = "file://${config.stylix.image}"; + }; + + dconf.settings."org/gnome/desktop/interface".color-scheme = + if config.stylix.polarity == "dark" + then "prefer-dark" + else "default"; + }]; # As Stylix is controlling the wallpaper, there is no need for this # pack of default wallpapers to be installed.