Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/desktops/pantheon/**/*
- nixos/modules/services/x11/desktop-managers/pantheon.nix
- nixos/modules/services/desktop-managers/pantheon.nix
- nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
- nixos/tests/pantheon.nix
- pkgs/desktops/pantheon/**/*
Expand Down
2 changes: 1 addition & 1 deletion nixos/doc/manual/release-notes/rl-2003.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In addition to numerous new and upgraded packages, this release has the followin

- GNOME 3 has been upgraded to 3.34. Please take a look at their [Release Notes](https://help.gnome.org/misc/release-notes/3.34) for details.

- If you enable the Pantheon Desktop Manager via [services.xserver.desktopManager.pantheon.enable](options.html#opt-services.xserver.desktopManager.pantheon.enable), we now default to also use [ Pantheon's newly designed greeter ](https://blog.elementary.io/say-hello-to-the-new-greeter/). Contrary to NixOS's usual update policy, Pantheon will receive updates during the cycle of NixOS 20.03 when backwards compatible.
- If you enable the Pantheon Desktop Manager via `services.xserver.desktopManager.pantheon.enable`, we now default to also use [ Pantheon's newly designed greeter ](https://blog.elementary.io/say-hello-to-the-new-greeter/). Contrary to NixOS's usual update policy, Pantheon will receive updates during the cycle of NixOS 20.03 when backwards compatible.

- By default zfs pools will now be trimmed on a weekly basis. Trimming is only done on supported devices (i.e. NVME or SSDs) and should improve throughput and lifetime of these devices. It is controlled by the `services.zfs.trim.enable` varname. The zfs scrub service (`services.zfs.autoScrub.enable`) and the zfs autosnapshot service (`services.zfs.autoSnapshot.enable`) are now only enabled if zfs is set in `config.boot.initrd.supportedFilesystems` or `config.boot.supportedFilesystems`. These lists will automatically contain zfs as soon as any zfs mountpoint is configured in `fileSystems`.

Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2511.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@

- mate-wayland-session 1.28.4 is now using the default wayfire decorator instead of firedecor, thus `services.xserver.desktopManager.mate.enableWaylandSession` is no longer shipping firedecor. If you are experiencing broken window decorations after upgrade, backup and remove `~/.config/mate/wayfire.ini` and re-login.

- Due to [deprecation of gnome-session X11 support](https://blogs.gnome.org/alatiera/2025/06/08/the-x11-session-removal/), `services.desktopManager.pantheon` now defaults to pantheon-wayland session. The X11 session will be removed before gnome-session 49 lands.

- `services.gitea` supports sending notifications with sendmail again. To do this, activate the parameter `services.gitea.mailerUseSendmail` and configure SMTP server.

- Revamp of the ACME certificate acquisication and renewal process to help scale systems with lots (100+) of certificates.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pantheon is the desktop environment created for the elementary OS distribution.

All of Pantheon is working in NixOS and the applications should be available, aside from a few [exceptions](https://github.com/NixOS/nixpkgs/issues/58161). To enable Pantheon, set
```nix
{ services.xserver.desktopManager.pantheon.enable = true; }
{ services.desktopManager.pantheon.enable = true; }
```
This automatically enables LightDM and Pantheon's LightDM greeter. If you'd like to disable this, set
```nix
Expand All @@ -25,8 +25,8 @@ You can also use [](#opt-environment.pantheon.excludePackages) to remove any oth

Wingpanel and Switchboard work differently than they do in other distributions, as far as using plugins. You cannot install a plugin globally (like with {option}`environment.systemPackages`) to start using it. You should instead be using the following options:

- [](#opt-services.xserver.desktopManager.pantheon.extraWingpanelIndicators)
- [](#opt-services.xserver.desktopManager.pantheon.extraSwitchboardPlugs)
- [](#opt-services.desktopManager.pantheon.extraWingpanelIndicators)
- [](#opt-services.desktopManager.pantheon.extraSwitchboardPlugs)

to configure the programs with plugs or indicators.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ with lib;

let

cfg = config.services.xserver.desktopManager.pantheon;
cfg = config.services.desktopManager.pantheon;
serviceCfg = config.services.pantheon;

nixos-gsettings-desktop-schemas = pkgs.pantheon.elementary-gsettings-schemas.override {
Expand All @@ -28,6 +28,13 @@ in
maintainers = teams.pantheon.members;
};

imports = [
(lib.mkRenamedOptionModule
[ "services" "xserver" "desktopManager" "pantheon" ]
[ "services" "desktopManager" "pantheon" ]
)
];

options = {

services.pantheon = {
Expand All @@ -40,7 +47,7 @@ in

};

services.xserver.desktopManager.pantheon = {
services.desktopManager.pantheon = {
enable = mkOption {
type = types.bool;
default = false;
Expand Down Expand Up @@ -98,7 +105,7 @@ in

config = mkMerge [
(mkIf cfg.enable {
services.xserver.desktopManager.pantheon.sessionPath = utils.removePackagesByName [
services.desktopManager.pantheon.sessionPath = utils.removePackagesByName [
pkgs.pantheon.pantheon-agent-geoclue2
] config.environment.pantheon.excludePackages;

Expand All @@ -114,7 +121,14 @@ in

# Without this, elementary LightDM greeter will pre-select non-existent `default` session
# https://github.com/elementary/greeter/issues/368
services.displayManager.defaultSession = mkDefault "pantheon";
services.displayManager.defaultSession = mkDefault "pantheon-wayland";
programs.dconf.profiles.user.databases = [
{
settings."io/elementary/greeter" = {
last-session-type = "pantheon-wayland";
};
}
];

environment.extraInit = ''
${concatMapStrings (p: ''
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/x11/desktop-managers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ in
./retroarch.nix
./kodi.nix
./mate.nix
./pantheon.nix
../../desktop-managers/pantheon.nix
./surf-display.nix
./cde.nix
./cinnamon.nix
Expand Down
2 changes: 1 addition & 1 deletion nixos/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ rec {
{ ... }:
{
services.xserver.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
services.desktopManager.pantheon.enable = true;
}
);

Expand Down
1 change: 0 additions & 1 deletion nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,6 @@ in
patroni = handleTestOn [ "x86_64-linux" ] ./patroni.nix { };
pantalaimon = runTest ./matrix/pantalaimon.nix;
pantheon = runTest ./pantheon.nix;
pantheon-wayland = runTest ./pantheon-wayland.nix;
paperless = runTest ./paperless.nix;
parsedmarc = handleTest ./parsedmarc { };
password-option-override-ordering = runTest ./password-option-override-ordering.nix;
Expand Down
104 changes: 0 additions & 104 deletions nixos/tests/pantheon-wayland.nix

This file was deleted.

69 changes: 34 additions & 35 deletions nixos/tests/pantheon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,40 @@
nodes.machine =
{ ... }:

let
videosAutostart = pkgs.writeTextFile {
name = "autostart-elementary-videos";
destination = "/etc/xdg/autostart/io.elementary.videos.desktop";
text = ''
[Desktop Entry]
Version=1.0
Name=Videos
Type=Application
Terminal=false
Exec=io.elementary.videos %U
'';
};
in
{
imports = [ ./common/user-account.nix ];

# Workaround ".gala-wrapped invoked oom-killer"
virtualisation.memorySize = 2047;

services.xserver.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
services.desktopManager.pantheon.enable = true;

# We ship pantheon.appcenter by default when this is enabled.
services.flatpak.enable = true;

# For basic OCR tests.
environment.systemPackages = [ videosAutostart ];

# We don't ship gnome-text-editor in Pantheon module, we add this line mainly
# to catch eval issues related to this option.
environment.pantheon.excludePackages = [ pkgs.gnome-text-editor ];

environment.systemPackages = [ pkgs.xdotool ];
programs.ydotool.enable = true;
};

enableOCR = true;
Expand All @@ -33,83 +50,65 @@
{ nodes, ... }:
let
user = nodes.machine.users.users.alice;
bob = nodes.machine.users.users.bob;
in
''
machine.wait_for_unit("display-manager.service")

with subtest("Test we can see usernames in elementary-greeter"):
machine.wait_for_text("${user.description}")
machine.wait_until_succeeds("pgrep -f io.elementary.greeter-compositor")
# OCR was struggling with this one.
# machine.wait_for_text("${bob.description}")
# Ensure the password box is focused by clicking it.
# Workaround for https://github.com/NixOS/nixpkgs/issues/211366.
machine.succeed("XAUTHORITY=/var/lib/lightdm/.Xauthority DISPLAY=:0 xdotool mousemove 512 505 click 1")
machine.succeed("ydotool mousemove -a 220 275")
machine.succeed("ydotool click 0xC0")
machine.sleep(2)
machine.screenshot("elementary_greeter_lightdm")

with subtest("Login with elementary-greeter"):
machine.send_chars("${user.password}\n")
machine.wait_for_x()
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"')

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

with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")

with subtest("Check if Pantheon components actually start"):
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "io.elementary.desktop.agent-polkit"]:
# We specifically check gsd-xsettings here since it is manually pulled up by gala.
# https://github.com/elementary/gala/pull/2140
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]:
machine.wait_until_succeeds(f"pgrep -f {i}")
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock"]:
machine.wait_for_window(i)
machine.wait_until_succeeds("pgrep -xf ${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal")

with subtest("Check if various environment variables are set"):
cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ"
machine.succeed(f"{cmd} | grep 'XDG_CURRENT_DESKTOP' | grep 'Pantheon'")
machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'")
# Hopefully from the sessionPath option.
machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'")
# Hopefully from login shell.
machine.succeed(f"{cmd} | grep '__NIXOS_SET_ENVIRONMENT_DONE' | grep '1'")
# Hopefully from gcr-ssh-agent.
machine.succeed(f"{cmd} | grep 'SSH_AUTH_SOCK' | grep 'gcr'")

with subtest("Open elementary videos"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.videos >&2 &'")
machine.sleep(2)
machine.wait_for_window("io.elementary.videos")
with subtest("Wait for elementary videos autostart"):
machine.wait_until_succeeds("pgrep -f io.elementary.videos")
machine.wait_for_text("No Videos Open")

with subtest("Open elementary calendar"):
machine.wait_until_succeeds("pgrep -f evolution-calendar-factory")
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.calendar >&2 &'")
machine.sleep(2)
machine.wait_for_window("io.elementary.calendar")

with subtest("Open system settings"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.settings >&2 &'")
# Wait for all plugins to be loaded before we check if the window is still there.
machine.sleep(5)
machine.wait_for_window("io.elementary.settings")

with subtest("Open elementary terminal"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal >&2 &'")
machine.wait_for_window("io.elementary.terminal")
machine.screenshot("videos")

with subtest("Trigger multitasking view"):
cmd = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1"
env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus DISPLAY=:0"
env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus"
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
machine.sleep(5)
machine.screenshot("multitasking")
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")

with subtest("Check if gala has ever coredumped"):
machine.fail("coredumpctl --json=short | grep gala")
# So you can see the dock in the below screenshot.
machine.succeed("su - ${user.name} -c 'DISPLAY=:0 xdotool mousemove 450 1000 >&2 &'")
# So we can see the dock.
machine.execute("pkill -f -9 io.elementary.videos")
machine.sleep(10)
machine.screenshot("screen")
'';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@

# Enable the Pantheon Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
services.desktopManager.pantheon.enable = true;

"""

Expand Down
Loading
Loading