nixos/cinnamon: don't override greeter theme if the package is excluded

This makes it possible to remove mint themes in an easy way, in this
case we will just use the default from slick-greeter module, i.e. the
Adwaita theme.
This commit is contained in:
Bobby Rong
2022-11-10 14:47:06 +08:00
parent ba4494f8f6
commit 8380ac4538
@@ -12,6 +12,7 @@ let
extraGSettingsOverrides = cfg.extraGSettingsOverrides;
};
notExcluded = pkg: (!(lib.elem pkg config.environment.cinnamon.excludePackages));
in
{
@@ -65,10 +66,14 @@ in
enable = mkDefault true;
# Taken from mint-artwork.gschema.override
theme.name = mkDefault "Mint-X";
theme.package = mkDefault pkgs.cinnamon.mint-themes;
iconTheme.name = mkDefault "Mint-X-Dark";
iconTheme.package = mkDefault pkgs.cinnamon.mint-x-icons;
theme = mkIf (notExcluded pkgs.cinnamon.mint-themes) {
name = mkDefault "Mint-X";
package = mkDefault pkgs.cinnamon.mint-themes;
};
iconTheme = mkIf (notExcluded pkgs.cinnamon.mint-x-icons) {
name = mkDefault "Mint-X-Dark";
package = mkDefault pkgs.cinnamon.mint-x-icons;
};
};
services.xserver.displayManager.sessionCommands = ''
if test "$XDG_CURRENT_DESKTOP" = "Cinnamon"; then