aboutsummaryrefslogtreecommitdiff
path: root/.gitpod.Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to '.gitpod.Dockerfile')
-rw-r--r--.gitpod.Dockerfile27
1 files changed, 27 insertions, 0 deletions
diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile
new file mode 100644
index 0000000..c5b5cc1
--- /dev/null
+++ b/.gitpod.Dockerfile
@@ -0,0 +1,27 @@
+FROM gitpod/workspace-full
+
+USER root
+
+# Install Nix
+RUN addgroup --system nixbld \
+ && adduser gitpod nixbld \
+ && for i in $(seq 1 30); do useradd -ms /bin/bash nixbld$i && adduser nixbld$i nixbld; done \
+ && mkdir -m 0755 /nix && chown gitpod /nix \
+ && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
+
+# Install Nix
+CMD /bin/bash -l
+USER gitpod
+ENV USER gitpod
+WORKDIR /home/gitpod
+
+RUN touch .bash_profile \
+ && curl https://nixos.org/releases/nix/nix-2.3.10/install | sh
+
+RUN echo '. /home/gitpod/.nix-profile/etc/profile.d/nix.sh' >> /home/gitpod/.bashrc
+
+# Install coq & math-comp environement
+RUN . /home/gitpod/.nix-profile/etc/profile.d/nix.sh \
+ && nix-env -iA cachix -f https://cachix.org/api/v1/install \
+ && cachix use coq \
+ && cachix use math-comp