Unverified Commit 3b48b3aa authored by Bobby Rong's avatar Bobby Rong Committed by GitHub
Browse files

Merge pull request #289062 from bobby285271/upd/mate

MATE 1.28
parents 101121be dff5e178
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -320,7 +320,12 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m

- `addDriverRunpath` has been added to facilitate the deprecation of the old `addOpenGLRunpath` setuphook. This change is motivated by the evolution of the setuphook to include all hardware acceleration.

- Cinnamon has been updated to 6.0. Please beware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release.
- Cinnamon has been updated to 6.0. Please beware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release and could potentially [affect Xorg sessions](https://blog.linuxmint.com/?p=4639). We suggest a reboot when switching between sessions.

- MATE has been updated to 1.28.
  - To properly support panel plugins built with Wayland (in-process) support, we are introducing `services.xserver.desktopManager.mate.extraPanelApplets` option, please use that for installing panel applets.
  - Similarly, please use `services.xserver.desktopManager.mate.extraCajaExtensions` option for installing Caja extensions.
  - To use the Wayland session, enable `services.xserver.desktopManager.mate.enableWaylandSession`. This is opt-in for now as it is in early stage and introduces a new set of Wayfire closure. Due to [known issues with LightDM](https://github.com/canonical/lightdm/issues/63), we suggest using SDDM for display manager.

- New `boot.loader.systemd-boot.xbootldrMountPoint` allows setting up a separate [XBOOTLDR partition](https://uapi-group.org/specifications/specs/boot_loader_specification/) to store boot files. Useful on systems with a small EFI System partition that cannot be easily repartitioned.

+75 −51
Original line number Diff line number Diff line
@@ -20,6 +20,22 @@ in
      };

      debug = mkEnableOption (lib.mdDoc "mate-session debug messages");

      extraPanelApplets = mkOption {
        default = [ ];
        example = literalExpression "with pkgs.mate; [ mate-applets ]";
        type = types.listOf types.package;
        description = lib.mdDoc "Extra applets to add to mate-panel.";
      };

      extraCajaExtensions = mkOption {
        default = [ ];
        example = lib.literalExpression "with pkgs.mate; [ caja-extensions ]";
        type = types.listOf types.package;
        description = lib.mdDoc "Extra extensions to add to caja.";
      };

      enableWaylandSession = mkEnableOption (lib.mdDoc "MATE Wayland session");
    };

    environment.mate.excludePackages = mkOption {
@@ -31,19 +47,12 @@ in

  };

  config = mkIf cfg.enable {

  config = mkMerge [
    (mkIf (cfg.enable || cfg.enableWaylandSession) {
      services.xserver.displayManager.sessionPackages = [
        pkgs.mate.mate-session-manager
      ];

    # Let caja find extensions
    environment.sessionVariables.CAJA_EXTENSION_DIRS = [ "${config.system.path}/lib/caja/extensions-2.0" ];

    # 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";

@@ -51,6 +60,12 @@ in
        (pkgs.mate.basePackages ++
        pkgs.mate.extraPackages ++
        [
          (pkgs.mate.caja-with-extensions.override {
            extensions = cfg.extraCajaExtensions;
          })
          (pkgs.mate.mate-panel-with-applets.override {
            applets = cfg.extraPanelApplets;
          })
          pkgs.desktop-file-utils
          pkgs.glib
          pkgs.gtk3.out
@@ -80,6 +95,15 @@ in
      xdg.portal.configPackages = mkDefault [ pkgs.mate.mate-desktop ];

      environment.pathsToLink = [ "/share" ];
  };
    })
    (mkIf cfg.enableWaylandSession {
      programs.wayfire.enable = true;
      programs.wayfire.plugins = [ pkgs.wayfirePlugins.firedecor ];

      environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${pkgs.mate.mate-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";

      environment.systemPackages = [ pkgs.mate.mate-wayland-session ];
      services.xserver.displayManager.sessionPackages = [ pkgs.mate.mate-wayland-session ];
    })
  ];
}
+1 −0
Original line number Diff line number Diff line
@@ -513,6 +513,7 @@ in {
  mastodon = discoverTests (import ./web-apps/mastodon { inherit handleTestOn; });
  pixelfed = discoverTests (import ./web-apps/pixelfed { inherit handleTestOn; });
  mate = handleTest ./mate.nix {};
  mate-wayland = handleTest ./mate-wayland.nix {};
  matter-server = handleTest ./matter-server.nix {};
  matomo = handleTest ./matomo.nix {};
  matrix-appservice-irc = handleTest ./matrix/appservice-irc.nix {};
+63 −0
Original line number Diff line number Diff line
import ./make-test-python.nix ({ pkgs, lib, ... }: {
  name = "mate-wayland";

  meta.maintainers = lib.teams.mate.members;

  nodes.machine = { ... }: {
    imports = [
      ./common/user-account.nix
    ];

    services.xserver.enable = true;
    services.xserver.displayManager = {
      sddm.enable = true; # https://github.com/canonical/lightdm/issues/63
      sddm.wayland.enable = true;
      defaultSession = "MATE";
      autoLogin = {
        enable = true;
        user = "alice";
      };
    };
    services.xserver.desktopManager.mate.enableWaylandSession = true;

    hardware.pulseaudio.enable = true;

    # Need to switch to a different GPU driver than the default one (-vga std) so that wayfire can launch:
    virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
  };

  enableOCR = true;

  testScript = { nodes, ... }:
    let
      user = nodes.machine.users.users.alice;
    in
    ''
      machine.wait_for_unit("display-manager.service")

      with subtest("Wait for Wayland server"):
          machine.wait_for_file("/run/user/${toString user.uid}/wayland-1")

      with subtest("Check if MATE session components actually start"):
          for i in ["wayfire", "mate-panel", "mate-wayland.sh", "mate-wayland-components.sh"]:
              machine.wait_until_succeeds(f"pgrep -f {i}")
          machine.wait_for_text('(Applications|Places|System)')
          # It is expected that this applet doesn't work in Wayland
          machine.wait_for_text('WorkspaceSwitcherApplet')

      with subtest("Check if various environment variables are set"):
          cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf mate-panel)/environ"
          machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'")
          machine.succeed(f"{cmd} | grep 'XDG_SESSION_DESKTOP' | grep 'MATE'")
          machine.succeed(f"{cmd} | grep 'MATE_PANEL_APPLETS_DIR' | grep '${pkgs.mate.mate-panel-with-applets.pname}'")

      with subtest("Check if Wayfire config is properly configured"):
          for i in ["button_style = mate", "firedecor", "mate-wayland-components.sh"]:
              machine.wait_until_succeeds(f"cat /home/${user.name}/.config/mate/wayfire.ini | grep '{i}'")

      with subtest("Check if Wayfire has ever coredumped"):
          machine.fail("coredumpctl --json=short | grep wayfire")
          machine.sleep(10)
          machine.screenshot("screen")
    '';
})
+9 −0
Original line number Diff line number Diff line
@@ -54,6 +54,15 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
          machine.wait_for_text('(Applications|Places|System)')
          machine.wait_for_text('(Computer|Home|Trash)')

      with subtest("Check if various environment variables are set"):
          machine.succeed("xargs --null --max-args=1 echo < /proc/$(pgrep -xf marco)/environ | grep 'XDG_CURRENT_DESKTOP' | grep 'MATE'")
          # From mate-panel-with-applets packaging
          machine.succeed("xargs --null --max-args=1 echo < /proc/$(pgrep -xf mate-panel)/environ | grep 'MATE_PANEL_APPLETS_DIR' | grep '${pkgs.mate.mate-panel-with-applets.pname}'")

      with subtest("Check if applets are built with in-process support"):
          # This is needed for Wayland support
          machine.fail("pgrep -fa clock-applet")

      with subtest("Lock the screen"):
          machine.wait_until_succeeds("su - ${user.name} -c '${env} mate-screensaver-command -q' | grep 'The screensaver is inactive'")
          machine.succeed("su - ${user.name} -c '${env} mate-screensaver-command -l >&2 &'")
Loading