From 8380ac45386c8dcd9ea372eb761ce2ef74f71cbc Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 10 Nov 2022 14:21:42 +0800 Subject: [PATCH] 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. --- .../services/x11/desktop-managers/cinnamon.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index 1bc5d108af0a..2c59ee410d5f 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -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