summaryrefslogtreecommitdiff
path: root/bragi.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-10 01:05:18 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-10 01:05:18 +0100
commit1c20c173d1748be5a28719fcdd12e7ac180fc075 (patch)
tree938ad1f1a22a8a298f1b247fa98740560616f062 /bragi.nix
parent65750f6a2e08be179c716fd676654acc419071e0 (diff)
downloadnixos-1c20c173d1748be5a28719fcdd12e7ac180fc075.tar
nixos-1c20c173d1748be5a28719fcdd12e7ac180fc075.tar.gz
nixos-1c20c173d1748be5a28719fcdd12e7ac180fc075.tar.bz2
nixos-1c20c173d1748be5a28719fcdd12e7ac180fc075.tar.xz
nixos-1c20c173d1748be5a28719fcdd12e7ac180fc075.zip
Configure deps in service
Diffstat (limited to 'bragi.nix')
-rw-r--r--bragi.nix6
1 files changed, 2 insertions, 4 deletions
diff --git a/bragi.nix b/bragi.nix
index e1ac5d20..ce53e6ee 100644
--- a/bragi.nix
+++ b/bragi.nix
@@ -298,16 +298,14 @@ in rec {
298 }; 298 };
299 299
300 systemd.services."bar" = { 300 systemd.services."bar" = {
301 environment = config.nix.envVars // { 301 environment = {
302 inherit (config.environment.sessionVariables) NIX_PATH;
303 PORT = "8082"; 302 PORT = "8082";
304 }; 303 };
305 requires = [ "postgresql.service" ]; 304 requires = [ "postgresql.service" ];
306 wantedBy = [ "default.target" ]; 305 wantedBy = [ "default.target" ];
307 path = [ config.nix.package.out ];
308 serviceConfig = { 306 serviceConfig = {
309 Type = "simple"; 307 Type = "simple";
310 ExecStart = ./bragi/bar.hs; 308 ExecStart = (pkgs.haskellPackages.ghcWithPackages (p: with p; [yesod persistent-postgresql])) ++ "/bin/runghc ${./bragi/bar.hs}";
311 User = users.extraUsers."bar".name; 309 User = users.extraUsers."bar".name;
312 Group = users.extraUsers."bar".group; 310 Group = users.extraUsers."bar".group;
313 WorkingDirectory = "~"; 311 WorkingDirectory = "~";