diff options
author | Bobby Rong <rjl931189261@126.com> | 2022-11-12 08:56:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-12 08:56:04 +0800 |
commit | 3403c98eb46f7196f2dafb83436e96696d5baa93 (patch) | |
tree | 60c8019ead3a819f61c204008db98824b7734700 | |
parent | ab940807e453f805fb37aa6d2d7457a675aba7a8 (diff) | |
parent | 8380ac45386c8dcd9ea372eb761ce2ef74f71cbc (diff) |
Merge pull request #200167 from bobby285271/cinnamon
nixos/cinnamon: make it possible to remove core packages
-rw-r--r-- | maintainers/team-list.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/cinnamon.nix | 42 |
2 files changed, 27 insertions, 17 deletions
diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 34d847b01c207..994804deb802e 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 3d79a3b8513b8..2c59ee410d5fb 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 @@ -123,11 +128,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,24 +154,32 @@ in cinnamon-control-center cinnamon-settings-daemon libgnomekbd - orca # theme gnome.adwaita-icon-theme - hicolor-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 + ] config.environment.cinnamon.excludePackages); - # other - glib # for gsettings - shared-mime-info # for update-mime-database - xdg-user-dirs - ]; + 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"; @@ -183,7 +193,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"; |