Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

dbus service: use makeDBusConf

+4 -37
-5
nixos/modules/services/system/dbus-session-local.conf.in
··· 1 - <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" 2 - "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> 3 - <busconfig> 4 - @extra@ 5 - </busconfig>
-6
nixos/modules/services/system/dbus-system-local.conf.in
··· 1 - <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" 2 - "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> 3 - <busconfig> 4 - <servicehelper>@servicehelper@</servicehelper> 5 - @extra@ 6 - </busconfig>
+4 -26
nixos/modules/services/system/dbus.nix
··· 10 10 11 11 homeDir = "/run/dbus"; 12 12 13 - systemExtraxml = concatStrings (flip concatMap cfg.packages (d: [ 14 - "<servicedir>${d}/share/dbus-1/system-services</servicedir>" 15 - "<includedir>${d}/etc/dbus-1/system.d</includedir>" 16 - ])); 17 - 18 - sessionExtraxml = concatStrings (flip concatMap cfg.packages (d: [ 19 - "<servicedir>${d}/share/dbus-1/services</servicedir>" 20 - "<includedir>${d}/etc/dbus-1/session.d</includedir>" 21 - ])); 22 - 23 - configDir = pkgs.runCommand "dbus-conf" 24 - { preferLocalBuild = true; 25 - allowSubstitutes = false; 26 - } 27 - '' 28 - mkdir -p $out 29 - 30 - sed '${./dbus-system-local.conf.in}' \ 31 - -e 's,@servicehelper@,${config.security.wrapperDir}/dbus-daemon-launch-helper,g' \ 32 - -e 's,@extra@,${systemExtraxml},' \ 33 - > "$out/system-local.conf" 34 - 35 - sed '${./dbus-session-local.conf.in}' \ 36 - -e 's,@extra@,${sessionExtraxml},' \ 37 - > "$out/session-local.conf" 38 - ''; 13 + configDir = pkgs.makeDBusConf { 14 + suidHelper = "${config.security.wrapperDir}/dbus-daemon-launch-helper"; 15 + serviceDirectories = cfg.packages; 16 + }; 39 17 40 18 in 41 19