From fa3008b93c251a0f4a6dc9510b2b021676246045 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 8 Nov 2022 15:57:03 +0800 Subject: [PATCH 1/5] nixos/cinnamon: switch to xdg.mime.enable We enable this option explicitly to prevent users from accidentally disabling it and getting a broken desktop. --- nixos/modules/services/x11/desktop-managers/cinnamon.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index 3d79a3b8513b..f5a03aee614f 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -167,10 +167,11 @@ in # other glib # for gsettings - shared-mime-info # for update-mime-database xdg-user-dirs ]; + xdg.mime.enable = true; + # Override GSettings schemas environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; From e88b1dc9c8885b2853499f013101bfc68c80b1fe Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 8 Nov 2022 15:58:04 +0800 Subject: [PATCH 2/5] nixos/cinnamon: switch to xdg.icons.enable We enable this option explicitly to prevent users from accidentally disabling it and getting a broken desktop. --- nixos/modules/services/x11/desktop-managers/cinnamon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index f5a03aee614f..9b29a5ddc6a2 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -156,7 +156,6 @@ in # theme gnome.adwaita-icon-theme - hicolor-icon-theme gnome.gnome-themes-extra gtk3.out mint-artwork @@ -171,6 +170,7 @@ in ]; xdg.mime.enable = true; + xdg.icons.enable = true; # Override GSettings schemas environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; From bb307797918a9b3a5c0e1c50ecdc7db154eb1944 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 8 Nov 2022 15:58:54 +0800 Subject: [PATCH 3/5] nixos/cinnamon: fix some typos --- maintainers/team-list.nix | 2 +- nixos/modules/services/x11/desktop-managers/cinnamon.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 34d847b01c20..994804deb802 100644 --- a/maintainers/team-list.nix +++ b/maintainers/team-list.nix @@ -121,7 +121,7 @@ with lib.maintainers; { bobby285271 mkg20001 ]; - scope = "Maintain Cinnamon desktop environment and applications made by the LinuxMint team."; + scope = "Maintain Cinnamon desktop environment and applications made by the Linux Mint team."; shortName = "Cinnamon"; enableFeatureFreezePing = true; }; diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index 9b29a5ddc6a2..5548d7a3eef2 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -184,7 +184,7 @@ in programs.bash.vteIntegration = mkDefault true; programs.zsh.vteIntegration = mkDefault true; - # Harmonize Qt5 applications under Pantheon + # Harmonize Qt5 applications under Cinnamon qt5.enable = true; qt5.platformTheme = "gnome"; qt5.style = "adwaita"; From ba4494f8f67b3a160ecfd24391cea477f6a4ff6a Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 9 Nov 2022 22:40:05 +0800 Subject: [PATCH 4/5] nixos/cinnamon: make it possible to remove more non-essential packages Packages for accessibility and theme can now be removed with excludePackages --- .../x11/desktop-managers/cinnamon.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index 5548d7a3eef2..1bc5d108af0a 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -123,11 +123,8 @@ in cinnamon-screensaver = {}; }; - environment.systemPackages = with pkgs.cinnamon // pkgs; [ + environment.systemPackages = with pkgs.cinnamon // pkgs; ([ desktop-file-utils - nixos-artwork.wallpapers.simple-dark-gray - onboard - sound-theme-freedesktop # common-files cinnamon-common @@ -152,22 +149,29 @@ in cinnamon-control-center cinnamon-settings-daemon libgnomekbd - orca # theme gnome.adwaita-icon-theme gnome.gnome-themes-extra gtk3.out + + # other + glib # for gsettings + xdg-user-dirs + ] ++ utils.removePackagesByName [ + # accessibility + onboard + orca + + # theme + sound-theme-freedesktop + nixos-artwork.wallpapers.simple-dark-gray mint-artwork mint-themes mint-x-icons mint-y-icons vanilla-dmz - - # other - glib # for gsettings - xdg-user-dirs - ]; + ] config.environment.cinnamon.excludePackages); xdg.mime.enable = true; xdg.icons.enable = true; From 8380ac45386c8dcd9ea372eb761ce2ef74f71cbc Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 10 Nov 2022 14:21:42 +0800 Subject: [PATCH 5/5] 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