dbus: Use upstream units
This commit is contained in:
parent
fa3826dcf4
commit
b4afe5b7bc
|
@ -16,7 +16,7 @@ let
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
ensureDir $out
|
ensureDir $out
|
||||||
|
|
||||||
cp -v ${pkgs.dbus_daemon}/etc/dbus-1/system.conf $out/system.conf
|
cp -v ${pkgs.dbus.daemon}/etc/dbus-1/system.conf $out/system.conf
|
||||||
|
|
||||||
# !!! Hm, these `sed' calls are rather error-prone...
|
# !!! Hm, these `sed' calls are rather error-prone...
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ let
|
||||||
-e 's|<standard_system_servicedirs/>|${systemServiceDirs}|' \
|
-e 's|<standard_system_servicedirs/>|${systemServiceDirs}|' \
|
||||||
-e 's|<includedir>system.d</includedir>|${systemIncludeDirs}|'
|
-e 's|<includedir>system.d</includedir>|${systemIncludeDirs}|'
|
||||||
|
|
||||||
cp ${pkgs.dbus_daemon}/etc/dbus-1/session.conf $out/session.conf
|
cp ${pkgs.dbus.daemon}/etc/dbus-1/session.conf $out/session.conf
|
||||||
|
|
||||||
# Add the services and session.d directories to the session bus
|
# Add the services and session.d directories to the session bus
|
||||||
# search path.
|
# search path.
|
||||||
|
@ -97,7 +97,7 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.dbus_daemon pkgs.dbus_tools ];
|
environment.systemPackages = [ pkgs.dbus.daemon pkgs.dbus_tools ];
|
||||||
|
|
||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
{ source = configDir;
|
{ source = configDir;
|
||||||
|
@ -113,30 +113,7 @@ in
|
||||||
|
|
||||||
users.extraGroups.messagebus.gid = config.ids.gids.messagebus;
|
users.extraGroups.messagebus.gid = config.ids.gids.messagebus;
|
||||||
|
|
||||||
# FIXME: these are copied verbatim from the dbus source tree. We
|
systemd.packages = [ pkgs.dbus.daemon ];
|
||||||
# should install and use the originals.
|
|
||||||
systemd.units."dbus.socket".text =
|
|
||||||
''
|
|
||||||
[Unit]
|
|
||||||
Description=D-Bus System Message Bus Socket
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenStream=/var/run/dbus/system_bus_socket
|
|
||||||
'';
|
|
||||||
|
|
||||||
systemd.units."dbus.service".text =
|
|
||||||
''
|
|
||||||
[Unit]
|
|
||||||
Description=D-Bus System Message Bus
|
|
||||||
Requires=dbus.socket
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=${pkgs.dbus_tools}/bin/dbus-uuidgen --ensure
|
|
||||||
ExecStartPre=-${pkgs.coreutils}/bin/rm -f /var/run/dbus/pid
|
|
||||||
ExecStart=${pkgs.dbus_daemon}/bin/dbus-daemon --system --address=systemd: --nofork --systemd-activation
|
|
||||||
ExecReload=${pkgs.dbus_tools}/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
|
|
||||||
OOMScoreAdjust=-900
|
|
||||||
'';
|
|
||||||
|
|
||||||
security.setuidOwners = singleton
|
security.setuidOwners = singleton
|
||||||
{ program = "dbus-daemon-launch-helper";
|
{ program = "dbus-daemon-launch-helper";
|
||||||
|
|
Loading…
Reference in New Issue