From 8301f1d5c1e6515b50ece3324c9d846d98bf4410 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 13 Jul 2017 11:55:46 +0200 Subject: [PATCH] Use optionalValue for error reporter initialization as well --- lib/node-application.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/node-application.nix b/lib/node-application.nix index 1819551..09cab0a 100644 --- a/lib/node-application.nix +++ b/lib/node-application.nix @@ -5,6 +5,7 @@ let buildNode2nixPackage = (import ./build/node2nix-package.nix) args; errorReporter = (import ./node-error-reporter) args; + optionalValue = (import ./util/optional-value.nix); in let serviceName = "node-${name}"; cfg = config.services."${serviceName}"; @@ -14,11 +15,11 @@ inherit src setupCommands; }; - errorReporterModule = if hasErrorReporting then (errorReporter { + errorReporterModule = optionalValue hasErrorReporting (errorReporter { application = application; applicationName = name; errorPath = errorPath; - }) else null; + }); in { imports = [ errorReporterModule