From 78a74ff0777b8202119cf82853d490393d79ef2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 6 Mar 2019 13:04:27 +0100 Subject: [PATCH] add env variables to make shell use nix without sourcing profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- nix/Dockerfile | 4 ++++ nix/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nix/Dockerfile b/nix/Dockerfile index d6eb05c..33d4d11 100644 --- a/nix/Dockerfile +++ b/nix/Dockerfile @@ -42,6 +42,10 @@ RUN export USER=jenkins \ # hack to avoid calling login ENV USER=jenkins +# make nix tools available by default +ENV PATH=/home/jenkins/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV NIX_PATH=nixpkgs=/home/jenkins/.nix-defexpr/channels/nixpkgs +ENV NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt MAINTAINER Jakub Sokolowski "jakub@status.im" LABEL description="Adjusted Nix Docker image for use with Jenkins" diff --git a/nix/Makefile b/nix/Makefile index e1d17da..98ab401 100644 --- a/nix/Makefile +++ b/nix/Makefile @@ -6,7 +6,7 @@ NIX_INSTALL = nix-install-$(NIX_VERSION).sh NIX_SHA = 0039df605d2324f721f0c99ab76fc58fa60f791d84b30196eed805e8e65b1e51 NIX_URL = https://nixos.org/releases/nix/nix-$(NIX_VERSION)/install -IMAGE_TAG = ubuntu +IMAGE_TAG = jenkins IMAGE_NAME = statusteam/nix:$(IMAGE_TAG) build: $(NIX_INSTALL)