From f292a27f442d10de4827800d064a3a8c64d05cee Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 6 Sep 2020 22:57:54 +0200 Subject: nixos/dbus: always use socket activates user session This removes the `services.dbus.socketActivated` and `services.xserver.startDbusSession` options. Instead the user D-Bus session is always socket activated. --- nixos/doc/manual/release-notes/rl-2103.xml | 10 +++++++++- nixos/modules/services/system/dbus.nix | 16 +++++++--------- nixos/modules/services/x11/display-managers/default.nix | 7 ------- nixos/modules/services/x11/xserver.nix | 11 +++-------- 4 files changed, 19 insertions(+), 25 deletions(-) (limited to 'nixos') diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml index eccf2b69dad93..c05d74ee728e4 100644 --- a/nixos/doc/manual/release-notes/rl-2103.xml +++ b/nixos/doc/manual/release-notes/rl-2103.xml @@ -59,7 +59,15 @@ - + + If the services.dbus module is enabled, then + the user D-Bus session is now always socket activated. The + associated options services.dbus.socketActivated + and services.xserver.startDbusSession have + therefore been removed and you will receive a warning if + they are present in your configuration. This change makes the + user D-Bus session available also for non-graphical logins. + diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix index 4a60fec1ca806..d9dd26f0f1892 100644 --- a/nixos/modules/services/system/dbus.nix +++ b/nixos/modules/services/system/dbus.nix @@ -19,6 +19,12 @@ in { + imports = [ + (mkRemovedOptionModule + [ "services" "dbus" "socketActivated" ] + "The user D-Bus session is now always socket activated and this option can safely be removed.") + ]; + ###### interface options = { @@ -51,14 +57,6 @@ in pkg/share/dbus-1/services ''; }; - - socketActivated = mkOption { - type = types.bool; - default = false; - description = '' - Make the user instance socket activated. - ''; - }; }; }; @@ -108,7 +106,7 @@ in reloadIfChanged = true; restartTriggers = [ configDir ]; }; - sockets.dbus.wantedBy = mkIf cfg.socketActivated [ "sockets.target" ]; + sockets.dbus.wantedBy = [ "sockets.target" ]; }; environment.pathsToLink = [ "/etc/dbus-1" "/share/dbus-1" ]; diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 08ce8edd66123..568aeaceef75f 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -37,13 +37,6 @@ let . /etc/profile cd "$HOME" - ${optionalString cfg.startDbusSession '' - if test -z "$DBUS_SESSION_BUS_ADDRESS"; then - /run/current-system/systemd/bin/systemctl --user start dbus.socket - export `/run/current-system/systemd/bin/systemctl --user show-environment | grep '^DBUS_SESSION_BUS_ADDRESS'` - fi - ''} - ${optionalString cfg.displayManager.job.logToJournal '' if [ -z "$_DID_SYSTEMD_CAT" ]; then export _DID_SYSTEMD_CAT=1 diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 400173745d3f9..914063842c9d6 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -151,6 +151,9 @@ in ./desktop-managers/default.nix (mkRemovedOptionModule [ "services" "xserver" "startGnuPGAgent" ] "See the 16.09 release notes for more information.") + (mkRemovedOptionModule + [ "services" "xserver" "startDbusSession" ] + "The user D-Bus session is now always socket activated and this option can safely be removed.") ]; @@ -296,14 +299,6 @@ in description = "DPI resolution to use for X server."; }; - startDbusSession = mkOption { - type = types.bool; - default = true; - description = '' - Whether to start a new DBus session when you log in with dbus-launch. - ''; - }; - updateDbusEnvironment = mkOption { type = types.bool; default = false; -- cgit 1.4.1