From a4eb645d0da4ce4743d86e1cfad7f7deb94de52c Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 14 May 2017 00:03:49 +0200 Subject: launchd: allow string entries for serviceOptions.path Fixes evaluation of khd. --- modules/launchd/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modules/launchd') diff --git a/modules/launchd/default.nix b/modules/launchd/default.nix index 16e761c..078bfff 100644 --- a/modules/launchd/default.nix +++ b/modules/launchd/default.nix @@ -14,6 +14,8 @@ let launchdConfig = import ./launchd.nix; + makeDrvBinPath = ps: concatMapStringsSep ":" (p: if isDerivation p then "${p}/bin" else p) ps; + serviceOptions = { config, name, ... }: let @@ -33,15 +35,14 @@ let }; path = mkOption { - type = types.listOf types.path; + type = types.loeOf (types.either types.path types.str); default = []; - apply = ps: "${makeBinPath ps}"; description = '' Packages added to the service's PATH - environment variable. Both the bin - and sbin subdirectories of each - package are added. + environment variable. Only the bin + and subdirectories of each package is added. ''; + apply = ps: if isList ps then (makeDrvBinPath ps) else ps; }; command = mkOption { -- cgit v1.2.3