From 2ddc420f9d7cb7c00d27391ba316fd502b5ad35b Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 13 Jul 2017 11:57:30 +0200 Subject: [PATCH] Minor cleanup --- lib/node-application.nix | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/node-application.nix b/lib/node-application.nix index 09cab0a..60a90da 100644 --- a/lib/node-application.nix +++ b/lib/node-application.nix @@ -16,35 +16,35 @@ }; errorReporterModule = optionalValue hasErrorReporting (errorReporter { - application = application; applicationName = name; - errorPath = errorPath; + inherit application errorPath; }); - in { - imports = [ - errorReporterModule - ]; + in + { + imports = [ + errorReporterModule + ]; - options.services."${serviceName}" = { - enable = mkEnableOption "${name}"; - } // serviceOptions; + options.services."${serviceName}" = { + enable = mkEnableOption "${name}"; + } // serviceOptions; - config = { - # FIXME: What if a username conflict occurs? - users.extraUsers."${name}" = mkIf cfg.enable { - description = "${name} Service User"; - }; + config = { + # FIXME: What if a username conflict occurs? + users.extraUsers."${name}" = mkIf cfg.enable { + description = "${name} Service User"; + }; - systemd.services."${serviceName}" = mkIf cfg.enable ({ - description = "${name} Service"; - wantedBy = ["multi-user.target"]; - after = ["network.target"]; + systemd.services."${serviceName}" = mkIf cfg.enable ({ + description = "${name} Service"; + wantedBy = ["multi-user.target"]; + after = ["network.target"]; - serviceConfig = { - ExecStart = "${application}/${mainBinaryPath}"; - User = name; - PermissionsStartOnly = true; - }; - } // serviceConfig); - }; - } + serviceConfig = { + ExecStart = "${application}/${mainBinaryPath}"; + User = name; + PermissionsStartOnly = true; + }; + } // serviceConfig); + }; + }