From 0fb12fb1b1f56df29e21f47d0560abb696d82fcf Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 10 Mar 2017 01:06:00 +0100 Subject: Cleanup --- bragi.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bragi.nix b/bragi.nix index ce53e6ee..cc8c5976 100644 --- a/bragi.nix +++ b/bragi.nix @@ -297,7 +297,9 @@ in rec { home = "/var/lib/bar"; }; - systemd.services."bar" = { + systemd.services."bar" = let + ghc = pkgs.haskellPackages.ghcWithPackages (p: with p; [yesod persistent-postgresql]); + in { environment = { PORT = "8082"; }; @@ -305,7 +307,7 @@ in rec { wantedBy = [ "default.target" ]; serviceConfig = { Type = "simple"; - ExecStart = (pkgs.haskellPackages.ghcWithPackages (p: with p; [yesod persistent-postgresql])) ++ "/bin/runghc ${./bragi/bar.hs}"; + ExecStart = "${ghc}/bin/runghc ${./bragi/bar.hs}"; User = users.extraUsers."bar".name; Group = users.extraUsers."bar".group; WorkingDirectory = "~"; -- cgit v1.2.3