summaryrefslogtreecommitdiff
path: root/bragi.nix
diff options
context:
space:
mode:
Diffstat (limited to 'bragi.nix')
-rw-r--r--bragi.nix6
1 files 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 {
297 home = "/var/lib/bar"; 297 home = "/var/lib/bar";
298 }; 298 };
299 299
300 systemd.services."bar" = { 300 systemd.services."bar" = let
301 ghc = pkgs.haskellPackages.ghcWithPackages (p: with p; [yesod persistent-postgresql]);
302 in {
301 environment = { 303 environment = {
302 PORT = "8082"; 304 PORT = "8082";
303 }; 305 };
@@ -305,7 +307,7 @@ in rec {
305 wantedBy = [ "default.target" ]; 307 wantedBy = [ "default.target" ];
306 serviceConfig = { 308 serviceConfig = {
307 Type = "simple"; 309 Type = "simple";
308 ExecStart = (pkgs.haskellPackages.ghcWithPackages (p: with p; [yesod persistent-postgresql])) ++ "/bin/runghc ${./bragi/bar.hs}"; 310 ExecStart = "${ghc}/bin/runghc ${./bragi/bar.hs}";
309 User = users.extraUsers."bar".name; 311 User = users.extraUsers."bar".name;
310 Group = users.extraUsers."bar".group; 312 Group = users.extraUsers."bar".group;
311 WorkingDirectory = "~"; 313 WorkingDirectory = "~";