diff options
author | Vincent Ambo <tazjin@google.com> | 2019-08-23T11·03+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-08-23T11·03+0100 |
commit | be074c60850a8bd6197e627c131d73e34d8640be (patch) | |
tree | 9d79a8e7e86807144f598cc509cdcfbc70a117b3 /services/tazblog/default.nix | |
parent | fb930e4db76fa71349dfeea78bdf34fb45b574c1 (diff) |
refactor(tazblog): Move blog configuration to envvars r/55
The port and resource directory are now specified via environment variables and a wrapper script is created by Nix that sets the resource path and so on correctly.
Diffstat (limited to '')
-rw-r--r-- | services/tazblog/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/tazblog/default.nix b/services/tazblog/default.nix index 3999f2b278cd..b1a1f95587bc 100644 --- a/services/tazblog/default.nix +++ b/services/tazblog/default.nix @@ -4,4 +4,9 @@ { pkgs ? import <nixpkgs> {} }: -pkgs.haskell.packages.ghc865.callPackage ./tazblog.nix {} +let tazblog = pkgs.haskell.packages.ghc865.callPackage ./tazblog.nix {}; +in pkgs.writeShellScriptBin "tazblog" '' + export PORT=8000 + export RESOURCE_DIR=${./static} + exec ${tazblog}/bin/tazblog +'' |