about summary refs log tree commit diff
path: root/services/tazblog/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-23T11·03+0100
committerVincent Ambo <tazjin@google.com>2019-08-23T11·03+0100
commitbe074c60850a8bd6197e627c131d73e34d8640be (patch)
tree9d79a8e7e86807144f598cc509cdcfbc70a117b3 /services/tazblog/default.nix
parentfb930e4db76fa71349dfeea78bdf34fb45b574c1 (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 'services/tazblog/default.nix')
-rw-r--r--services/tazblog/default.nix7
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
+''