2022-04-15 01:41:22 +00:00
|
|
|
{ config, lib, pkgs, utils, ... }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
xcfg = config.services.xserver;
|
|
|
|
cfg = xcfg.desktopManager.mate;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.xserver.desktopManager.mate = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Enable the MATE desktop environment";
|
|
|
|
};
|
|
|
|
|
|
|
|
debug = mkEnableOption "mate-session debug messages";
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.mate.excludePackages = mkOption {
|
|
|
|
default = [];
|
2021-10-06 13:57:05 +00:00
|
|
|
example = literalExpression "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]";
|
2020-04-24 23:36:52 +00:00
|
|
|
type = types.listOf types.package;
|
|
|
|
description = "Which MATE packages to exclude from the default environment";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.xserver.displayManager.sessionPackages = [
|
|
|
|
pkgs.mate.mate-session-manager
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
# Let caja find extensions
|
|
|
|
environment.sessionVariables.CAJA_EXTENSION_DIRS = [ "${config.system.path}/lib/caja/extensions-2.0" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Let mate-panel find applets
|
|
|
|
environment.sessionVariables."MATE_PANEL_APPLETS_DIR" = "${config.system.path}/share/mate-panel/applets";
|
|
|
|
environment.sessionVariables."MATE_PANEL_EXTRA_MODULES" = "${config.system.path}/lib/mate-panel/applets";
|
|
|
|
|
|
|
|
# Debugging
|
|
|
|
environment.sessionVariables.MATE_SESSION_DEBUG = mkIf cfg.debug "1";
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
environment.systemPackages = utils.removePackagesByName
|
2022-03-30 09:31:56 +00:00
|
|
|
(pkgs.mate.basePackages ++
|
|
|
|
pkgs.mate.extraPackages ++
|
2020-04-24 23:36:52 +00:00
|
|
|
[
|
|
|
|
pkgs.desktop-file-utils
|
|
|
|
pkgs.glib
|
|
|
|
pkgs.gtk3.out
|
|
|
|
pkgs.shared-mime-info
|
|
|
|
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
|
|
|
|
pkgs.yelp # for 'Contents' in 'Help' menus
|
2022-03-30 09:31:56 +00:00
|
|
|
])
|
|
|
|
config.environment.mate.excludePackages;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
# Shell integration for VTE terminals
|
|
|
|
programs.bash.vteIntegration = mkDefault true;
|
|
|
|
programs.zsh.vteIntegration = mkDefault true;
|
|
|
|
|
|
|
|
# Mate uses this for printing
|
|
|
|
programs.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
services.gnome.at-spi2-core.enable = true;
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
services.udev.packages = [ pkgs.mate.mate-settings-daemon ];
|
|
|
|
services.gvfs.enable = true;
|
|
|
|
services.upower.enable = config.powerManagement.enable;
|
2022-04-27 09:35:20 +00:00
|
|
|
services.xserver.libinput.enable = mkDefault true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
security.pam.services.mate-screensaver.unixAuth = true;
|
|
|
|
|
|
|
|
environment.pathsToLink = [ "/share" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|