diff --git a/modules/gnome.nix b/modules/gnome.nix index f47d924b..783751eb 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -4,10 +4,10 @@ options.stylix.targets.gnome.enable = config.lib.stylix.mkEnableTarget "GNOME" true; - config.home-manager.sharedModules = - if config.stylix.polarity == "dark" - then - lib.mkIf config.stylix.targets.gnome.enable [{ + 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"; @@ -17,12 +17,19 @@ color-scheme = "prefer-dark"; }; }] - else - lib.mkIf config.stylix.targets.gnome.enable [{ + else [{ dconf.settings."org/gnome/desktop/background" = { color-shading-type = "solid"; picture-options = "zoom"; picture-uri = "file://${config.stylix.image}"; }; }]; + + # As Stylix is controlling the wallpaper, there is no need for this + # pack of default wallpapers to be installed. + # If you want to use one, you can set stylix.image to something like + # "${pkgs.gnome.gnome-backgrounds}/path/to/your/preferred/background" + # which will then download the pack regardless of its exclusion below. + environment.gnome.excludePackages = [ pkgs.gnome.gnome-backgrounds ]; + }; }