From ac0cdc1952fb0133ec26f2fdde5a77a648d3c1cd Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Thu, 16 Feb 2017 14:56:45 +0300 Subject: [PATCH] dbus service: use makeDBusConf --- .../system/dbus-session-local.conf.in | 5 ---- .../services/system/dbus-system-local.conf.in | 6 ---- nixos/modules/services/system/dbus.nix | 30 +++---------------- 3 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 nixos/modules/services/system/dbus-session-local.conf.in delete mode 100644 nixos/modules/services/system/dbus-system-local.conf.in diff --git a/nixos/modules/services/system/dbus-session-local.conf.in b/nixos/modules/services/system/dbus-session-local.conf.in deleted file mode 100644 index 5fd6f80a3539..000000000000 --- a/nixos/modules/services/system/dbus-session-local.conf.in +++ /dev/null @@ -1,5 +0,0 @@ - - - @extra@ - diff --git a/nixos/modules/services/system/dbus-system-local.conf.in b/nixos/modules/services/system/dbus-system-local.conf.in deleted file mode 100644 index edbb476f585a..000000000000 --- a/nixos/modules/services/system/dbus-system-local.conf.in +++ /dev/null @@ -1,6 +0,0 @@ - - - @servicehelper@ - @extra@ - diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix index 33bc890a78c8..643bec188142 100644 --- a/nixos/modules/services/system/dbus.nix +++ b/nixos/modules/services/system/dbus.nix @@ -10,32 +10,10 @@ let homeDir = "/run/dbus"; - systemExtraxml = concatStrings (flip concatMap cfg.packages (d: [ - "${d}/share/dbus-1/system-services" - "${d}/etc/dbus-1/system.d" - ])); - - sessionExtraxml = concatStrings (flip concatMap cfg.packages (d: [ - "${d}/share/dbus-1/services" - "${d}/etc/dbus-1/session.d" - ])); - - 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