mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
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";
|
||||
|
||||
systemExtraxml = concatStrings (flip concatMap cfg.packages (d: [
|
||||
"<servicedir>${d}/share/dbus-1/system-services</servicedir>"
|
||||
"<includedir>${d}/etc/dbus-1/system.d</includedir>"
|
||||
]));
|
||||
|
||||
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"
|
||||
'';
|
||||
configDir = pkgs.makeDBusConf {
|
||||
suidHelper = "${config.security.wrapperDir}/dbus-daemon-launch-helper";
|
||||
serviceDirectories = cfg.packages;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user