diff options
| author | Cyril Cohen | 2021-03-14 22:28:53 +0100 |
|---|---|---|
| committer | GitHub | 2021-03-14 22:28:53 +0100 |
| commit | deb0e19892674652b430b3cb89259bb5afc089b8 (patch) | |
| tree | 94076f0aa9e8aeebcaa53c5149275cdd77576cb5 | |
| parent | 6380d68df35be46329cc75c2675b83d1b8a482a4 (diff) | |
more gitpod config (#722)
| -rw-r--r-- | .gitpod.dockerfile | 23 | ||||
| -rw-r--r-- | .gitpod.yml | 12 |
2 files changed, 31 insertions, 4 deletions
diff --git a/.gitpod.dockerfile b/.gitpod.dockerfile new file mode 100644 index 0000000..9c1da02 --- /dev/null +++ b/.gitpod.dockerfile @@ -0,0 +1,23 @@ +FROM gitpod/workspace-full + +# 0. Switch to root +USER root + +# 1. Install direnv & git-lfs +RUN sudo apt-get install -y \ + direnv \ + git-lfs + +# 2. Configure Nix +CMD /bin/bash -l +USER gitpod +ENV USER gitpod +WORKDIR /home/gitpod + +RUN mkdir -p /home/gitpod/.config/nixpkgs && echo '{ allowUnfree = true; }' >> /home/gitpod/.config/nixpkgs/config.nix + +RUN echo '. /home/gitpod/.nix-profile/etc/profile.d/nix.sh' >> /home/gitpod/.bashrc +RUN echo 'eval "$(direnv hook bash)"' >> /home/gitpod/.bashrc + +# n. Give back control +USER root
\ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml index 3818803..473628c 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,10 +1,14 @@ # The Docker image to run your workspace in. Defaults to gitpod/workspace-full -image: coqorg/coq:8.13 +image: .gitpod.dockerfile # Command to start on workspace startup (optional) tasks: -# - init: install -# command: -# Ports to expose on workspace startup (optional) + - init: sh <(curl -L https://nixos.org/nix/install) --no-daemon && direnv allow && de-preload + - command: sudo docker-up + ports: - port: 8000 onOpen: open-preview + +vscode: + extensions: # from https://open-vsx.org/ + - bbenoist.Nix@1.0.1:TbrU16w37jLfkqA6h20vuQ== |
