dbus service: use makeDBusConf
This commit is contained in:
parent
3e23ec4450
commit
ac0cdc1952
@ -1,5 +0,0 @@
|
|||||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
|
||||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
|
||||||
<busconfig>
|
|
||||||
@extra@
|
|
||||||
</busconfig>
|
|
@ -1,6 +0,0 @@
|
|||||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
|
||||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
|
||||||
<busconfig>
|
|
||||||
<servicehelper>@servicehelper@</servicehelper>
|
|
||||||
@extra@
|
|
||||||
</busconfig>
|
|
@ -10,32 +10,10 @@ let
|
|||||||
|
|
||||||
homeDir = "/run/dbus";
|
homeDir = "/run/dbus";
|
||||||
|
|
||||||
systemExtraxml = concatStrings (flip concatMap cfg.packages (d: [
|
configDir = pkgs.makeDBusConf {
|
||||||
"<servicedir>${d}/share/dbus-1/system-services</servicedir>"
|
suidHelper = "${config.security.wrapperDir}/dbus-daemon-launch-helper";
|
||||||
"<includedir>${d}/etc/dbus-1/system.d</includedir>"
|
serviceDirectories = cfg.packages;
|
||||||
]));
|
};
|
||||||
|
|
||||||
sessionExtraxml = concatStrings (flip concatMap cfg.packages (d: [
|
|
||||||
"<servicedir>${d}/share/dbus-1/services</servicedir>"
|
|
||||||
"<includedir>${d}/etc/dbus-1/session.d</includedir>"
|
|
||||||
]));
|
|
||||||
|
|
||||||
configDir = pkgs.runCommand "dbus-conf"
|
|
||||||
{ preferLocalBuild = true;
|
|
||||||
allowSubstitutes = false;
|
|
||||||
}
|
|
||||||
''
|
|
||||||
mkdir -p $out
|
|
||||||
|
|
||||||
sed '${./dbus-system-local.conf.in}' \
|
|
||||||
-e 's,@servicehelper@,${config.security.wrapperDir}/dbus-daemon-launch-helper,g' \
|
|
||||||
-e 's,@extra@,${systemExtraxml},' \
|
|
||||||
> "$out/system-local.conf"
|
|
||||||
|
|
||||||
sed '${./dbus-session-local.conf.in}' \
|
|
||||||
-e 's,@extra@,${sessionExtraxml},' \
|
|
||||||
> "$out/session-local.conf"
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user