aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradityarajagopal <adityarajagopal@github.com>2021-11-09 11:12:32 +0000
committeradityarajagopal <adityarajagopal@github.com>2021-11-09 11:12:53 +0000
commit3f777bbc5a77917b3e7c03d59488e5dc79c4e1e4 (patch)
treeafb425ca2d3596d0a18e790a72de73e40ab87f99
parent36e0e45e7c8f93bf6f733197bf19f277a5e11248 (diff)
downloadgsa-parser-3f777bbc5a77917b3e7c03d59488e5dc79c4e1e4.tar.gz
gsa-parser-3f777bbc5a77917b3e7c03d59488e5dc79c4e1e4.zip
README updated to for building nix into docker
-rw-r--r--README.md17
1 files changed, 13 insertions, 4 deletions
diff --git a/README.md b/README.md
index d7c6cb8..6d17487 100644
--- a/README.md
+++ b/README.md
@@ -2,10 +2,18 @@
## Build Instructions
-First, install nix:
+First, install nix. This is a bit of an effort on a docker image.
+So I'll push the container I have with it to the image so everyone has it.
+But if you want to install it yourself, you need to do the following steps.
+Create a temporary user as whom we install nix (it doesn't allow installation as root).
``` sh
-curl -L https://nixos.org/nix/install | sh
+apt install curl bzip2 adduser
+adduser --disabled-password --gecos '' nix-installer
+mkdir -m 0755 /nix && chown nix-installer /nix
+sudo -u nix-installer /bin/bash
+cd /home/nix-installer
+sh <(curl -L https://nixos.org/nix/install) --daemon
```
It's recommended to use `flake` in nix, which is experimental:
@@ -14,7 +22,7 @@ It's recommended to use `flake` in nix, which is experimental:
nix-env -iA nixpkgs.nixUnstable
```
-Then add the following to `~/.config/nix/nix.conf`:
+Then add the following to `/etc/nix/nix.conf`:
``` text
experimental-features = nix-command flakes
@@ -29,7 +37,8 @@ nix-env -iA cachix -f https://cachix.org/api/v1/install
Then, activate the following cache:
``` sh
-cachix use ymherklotz
+USER=root cachix use jmc
+USER=root cachix use ymherklotz
```
Then build the project using: