From 1c20c173d1748be5a28719fcdd12e7ac180fc075 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 10 Mar 2017 01:05:18 +0100 Subject: Configure deps in service --- bragi.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bragi.nix') diff --git a/bragi.nix b/bragi.nix index e1ac5d20..ce53e6ee 100644 --- a/bragi.nix +++ b/bragi.nix @@ -298,16 +298,14 @@ in rec { }; systemd.services."bar" = { - environment = config.nix.envVars // { - inherit (config.environment.sessionVariables) NIX_PATH; + environment = { PORT = "8082"; }; requires = [ "postgresql.service" ]; wantedBy = [ "default.target" ]; - path = [ config.nix.package.out ]; serviceConfig = { Type = "simple"; - ExecStart = ./bragi/bar.hs; + ExecStart = (pkgs.haskellPackages.ghcWithPackages (p: with p; [yesod persistent-postgresql])) ++ "/bin/runghc ${./bragi/bar.hs}"; User = users.extraUsers."bar".name; Group = users.extraUsers."bar".group; WorkingDirectory = "~"; -- cgit v1.2.3