about summary refs log tree commit diff
path: root/tools/nixery/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-12T16·14+0100
committerVincent Ambo <github@tazj.in>2019-08-13T23·02+0100
commit6d718bf2713a7e2209197247976390b878f51313 (patch)
tree6deaeb92468e17c8ea443523fd1a0043503d1066 /tools/nixery/default.nix
parent819b4602788195cacde48cf8bb36ab242d240512 (diff)
refactor(server): Use wrapper script to avoid path dependency
Instead of requiring the server component to be made aware of the
location of the Nix builder via environment variables, this commit
introduces a wrapper script for the builder that can simply exist on
the builders $PATH.

This is one step towards a slightly nicer out-of-the-box experience
when using `nix-build -A nixery-bin`.
Diffstat (limited to 'tools/nixery/default.nix')
-rw-r--r--tools/nixery/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix
index fe5afdb8ed..7d201869dc 100644
--- a/tools/nixery/default.nix
+++ b/tools/nixery/default.nix
@@ -25,6 +25,8 @@ rec {
   # data dependencies.
   nixery-server = callPackage ./server {};
 
+  # Implementation of the image building & layering logic
+  nixery-build-image = callPackage ./build-image {};
 
   # Use mdBook to build a static asset page which Nixery can then
   # serve. This is primarily used for the public instance at
@@ -37,7 +39,6 @@ rec {
   # In most cases, this will be the derivation a user wants if they
   # are installing Nixery directly.
   nixery-bin = writeShellScriptBin "nixery" ''
-    export NIX_BUILDER="${nixery-builder}"
     export WEB_DIR="${nixery-book}"
     exec ${nixery-server}/bin/nixery
   '';
@@ -84,6 +85,7 @@ rec {
       gnutar
       gzip
       nix
+      nixery-build-image
       nixery-launch-script
       openssh
     ];