From 2ead8126253b9737ec9a78e3d3d4b52904a8835c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 10 Mar 2017 01:01:15 +0100 Subject: Poke service config --- bragi.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bragi.nix b/bragi.nix index 4e537696..f5774548 100644 --- a/bragi.nix +++ b/bragi.nix @@ -298,15 +298,16 @@ in rec { }; systemd.services."bar" = { - environment = { + environment = config.nix.envVars // { + inherit (config.environment.sessionVariables) NIX_PATH; PORT = "8082"; - PATH = "/run/current-system/sw/bin"; }; requires = [ "postgresql.service" ]; wantedBy = [ "default.target" ]; + path = [ config.nix.package.out ]; serviceConfig = { Type = "simple"; - ExecStart = ./bragi/bar.hs; + execStart = ./bragi/bar.hs; User = users.extraUsers."bar".name; Group = users.extraUsers."bar".group; WorkingDirectory = "~"; -- cgit v1.2.3