1 { config, lib, pkgs, utils, ... }:
7 xcfg = config.services.xserver;
8 cfg = xcfg.desktopManager.mate;
15 services.xserver.desktopManager.mate = {
19 description = lib.mdDoc "Enable the MATE desktop environment";
22 debug = mkEnableOption (lib.mdDoc "mate-session debug messages");
25 environment.mate.excludePackages = mkOption {
27 example = literalExpression "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]";
28 type = types.listOf types.package;
29 description = lib.mdDoc "Which MATE packages to exclude from the default environment";
34 config = mkIf cfg.enable {
36 services.xserver.displayManager.sessionPackages = [
37 pkgs.mate.mate-session-manager
40 # Let caja find extensions
41 environment.sessionVariables.CAJA_EXTENSION_DIRS = [ "${config.system.path}/lib/caja/extensions-2.0" ];
43 # Let mate-panel find applets
44 environment.sessionVariables."MATE_PANEL_APPLETS_DIR" = "${config.system.path}/share/mate-panel/applets";
45 environment.sessionVariables."MATE_PANEL_EXTRA_MODULES" = "${config.system.path}/lib/mate-panel/applets";
48 environment.sessionVariables.MATE_SESSION_DEBUG = mkIf cfg.debug "1";
50 environment.systemPackages = utils.removePackagesByName
51 (pkgs.mate.basePackages ++
52 pkgs.mate.extraPackages ++
54 pkgs.desktop-file-utils
58 pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
59 pkgs.yelp # for 'Contents' in 'Help' menus
61 config.environment.mate.excludePackages;
63 programs.dconf.enable = true;
64 # Shell integration for VTE terminals
65 programs.bash.vteIntegration = mkDefault true;
66 programs.zsh.vteIntegration = mkDefault true;
68 # Mate uses this for printing
69 programs.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
71 services.gnome.at-spi2-core.enable = true;
72 services.gnome.gnome-keyring.enable = true;
73 services.udev.packages = [ pkgs.mate.mate-settings-daemon ];
74 services.gvfs.enable = true;
75 services.upower.enable = config.powerManagement.enable;
76 services.xserver.libinput.enable = mkDefault true;
78 security.pam.services.mate-screensaver.unixAuth = true;
80 xdg.portal.configPackages = mkDefault [ pkgs.mate.mate-desktop ];
82 environment.pathsToLink = [ "/share" ];