···
# D-Bus configuration and system bus daemon.
3
-
{ config, lib, options, pkgs, ... }:
3
+
{ config, lib, pkgs, ... }:
···
serviceDirectories = cfg.packages;
17
+
inherit (lib) mkOption types;
···
69
-
socketActivated = mkOption {
70
-
type = types.nullOr types.bool;
73
-
description = lib.mdDoc ''
74
-
Removed option, do not use.
80
-
###### implementation
82
-
config = mkIf cfg.enable {
83
-
warnings = optional (cfg.socketActivated != null) (
85
-
files = showFiles options.services.dbus.socketActivated.files;
87
-
"The option 'services.dbus.socketActivated' in ${files} no longer has"
88
-
+ " any effect and can be safely removed: the user D-Bus session is"
89
-
+ " now always socket activated."
92
-
environment.systemPackages = [ pkgs.dbus.daemon pkgs.dbus ];
69
+
config = lib.mkIf cfg.enable {
70
+
environment.systemPackages = [
environment.etc."dbus-1".source = configDir;
···
users.groups.messagebus.gid = config.ids.gids.messagebus;
105
-
systemd.packages = [ pkgs.dbus.daemon ];
85
+
systemd.packages = [
security.wrappers.dbus-daemon-launch-helper = {
108
-
source = "${pkgs.dbus.daemon}/libexec/dbus-daemon-launch-helper";
90
+
source = "${pkgs.dbus}/libexec/dbus-daemon-launch-helper";
···
services.dbus.packages = [
systemd.services.dbus = {
# Don't restart dbus-daemon. Bad things tend to happen if we do.
124
-
restartTriggers = [ configDir ];
125
-
environment = { LD_LIBRARY_PATH = config.system.nssModules.path; };
106
+
restartTriggers = [
110
+
LD_LIBRARY_PATH = config.system.nssModules.path;
130
-
# Don't restart dbus-daemon. Bad things tend to happen if we do.
131
-
reloadIfChanged = true;
132
-
restartTriggers = [ configDir ];
134
-
sockets.dbus.wantedBy = [ "sockets.target" ];
114
+
systemd.user.services.dbus = {
115
+
# Don't restart dbus-daemon. Bad things tend to happen if we do.
116
+
reloadIfChanged = true;
117
+
restartTriggers = [
137
-
environment.pathsToLink = [ "/etc/dbus-1" "/share/dbus-1" ];
122
+
systemd.user.sockets.dbus.wantedBy = [
126
+
environment.pathsToLink = [