From f9ec178d313fb5095d4d7bbffb9776d68b0b64e9 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 14 Jan 2026 23:39:13 +0800 Subject: [PATCH] nixos/pantheon: Start io.elementary.settings-daemon To test this, change your wallpaper and see if the change is reflected in greeter as well (the daemon syncs the wallpaper to /var/lib/AccountsService/users/$USER). --- .../services/desktop-managers/pantheon.nix | 16 ++++++++++++++++ nixos/tests/pantheon.nix | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/nixos/modules/services/desktop-managers/pantheon.nix b/nixos/modules/services/desktop-managers/pantheon.nix index 974ad1a1be41..7f7cd2593393 100644 --- a/nixos/modules/services/desktop-managers/pantheon.nix +++ b/nixos/modules/services/desktop-managers/pantheon.nix @@ -208,6 +208,22 @@ in "org.gnome.SettingsDaemon.XSettings.service" ]; + # https://github.com/elementary/settings-daemon/issues/217 + systemd.user.services.elementary-settings-daemon = { + description = "elementary Settings Daemon"; + wantedBy = [ "gnome-session-initialized.target" ]; + after = [ "gnome-session-initialized.target" ]; + + # The daemon might launch external applications via g_app_info_launch. + environment.PATH = lib.mkForce null; + + serviceConfig = { + Slice = "session.slice"; + ExecStart = "${pkgs.pantheon.elementary-settings-daemon}/bin/io.elementary.settings-daemon"; + Restart = "on-failure"; + }; + }; + # Global environment environment.systemPackages = (with pkgs.pantheon; [ diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix index 5ba36442274b..0b6b88c17e7f 100644 --- a/nixos/tests/pantheon.nix +++ b/nixos/tests/pantheon.nix @@ -85,6 +85,7 @@ # https://github.com/elementary/gala/pull/2140 "${pkgs.pantheon.gnome-settings-daemon}/libexec/gsd-xsettings", "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit", + "${pkgs.pantheon.elementary-settings-daemon}/bin/io.elementary.settings-daemon", "${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal" ] for i in pgrep_list: @@ -101,6 +102,11 @@ # Hopefully from gcr-ssh-agent. machine.succeed(f"{cmd} | grep 'SSH_AUTH_SOCK' | grep 'gcr'") + with subtest("Ensure custom keyboard shortcuts can launch external apps via settings-daemon"): + cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.elementary-settings-daemon}/bin/io.elementary.settings-daemon)/environ" + machine.succeed(f"{cmd} | grep '^PATH=' | grep '/run/current-system/sw/bin'") + machine.succeed(f"{cmd} | grep '^XDG_DATA_DIRS=' | grep '/run/current-system/sw/share'") + with subtest("Wait for elementary videos autostart"): machine.wait_until_succeeds("pgrep -xf /run/current-system/sw/bin/io.elementary.videos") machine.wait_for_text("No Videos Open")