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).
This commit is contained in:
Bobby Rong
2026-01-14 23:39:13 +08:00
parent ac14983643
commit f9ec178d31
2 changed files with 22 additions and 0 deletions

View File

@@ -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; [

View File

@@ -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")