|
1 | 1 | # The Developer Experience Shell
|
2 | 2 |
|
3 |
| -This repo contains a `nix develop` shell for haskell. Its primary purpose is to |
4 |
| -help get a development shell for haskell quickly and across multiple |
| 3 | +This repository contains a `nix develop` shell for Haskell. Its primary purpose |
| 4 | +is to help get a development shell for Haskell quickly and across multiple |
5 | 5 | operating systems (and architectures).
|
6 | 6 |
|
7 | 7 | It requires [`nix` to be installed](https://nixos.org/download.html).
|
8 | 8 |
|
9 |
| -Once you have `nix` installed, you can check that everything is working correctly: |
10 |
| -* Make sure to add `experimental-features = nix-command flakes` and `accept-flake-config = true` lines to `$XDG_CONFIG_HOME/nix/nix.conf` file ; |
11 |
| -* Make sure your `$USER` is trusted `nix show-config | grep trusted-users`, otherwise add it to `/etc/nix/nix.conf` and restart `nix-daemon` ; |
12 |
| -* Make sure the `nix-daemon` is running using `systemctl status nix-daemon` (if your OS is `systemd`-based). |
13 |
| - |
14 |
| -Once you have `nix`, (Linux, macOS, windows WSL) you can use: |
| 9 | +> :warning: **Warning** |
| 10 | +> The README previously suggested to add your current user to `trusted-users`, |
| 11 | +> but this is essentially equivalent to giving that user root access to the |
| 12 | +> system. |
| 13 | +
|
| 14 | +## Getting Started |
| 15 | + |
| 16 | +Once you have `nix` installed: |
| 17 | +- Add `experimental-features = nix-command flakes` to your |
| 18 | + `$XDG_CONFIG_HOME/nix/nix.conf` file to enable Nix flakes. |
| 19 | +- You should manually add necessary substituters and trusted public keys to your |
| 20 | + `/etc/nix/nix.conf`: |
| 21 | + ``` |
| 22 | + extra-substituters = https://cache.iog.io https://cache.zw3rk.com |
| 23 | + extra-trusted-public-keys = "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=" |
| 24 | + ``` |
| 25 | +- Ensure that `nix-daemon` is running (`systemctl status nix-daemon` on |
| 26 | + `systemd`-based systems). |
| 27 | + |
| 28 | +Then, (on Linux, macOS, windows WSL) you can use: |
15 | 29 | ```bash
|
16 | 30 | nix develop github:input-output-hk/devx#ghc96 --no-write-lock-file --refresh
|
17 | 31 | ```
|
18 | 32 |
|
19 |
| -Then, to obtain a haskell development shell for GHC 8.10.7 including `cabal-install`, |
20 |
| -as well as `hls` and `hlint`. If you are on macOS on an Apple Silicon chip (M1, M2, ...), |
21 |
| -and want to switch between Intel (x86_64) and Apple Silicon (aarch64), you can do |
22 |
| -this by simply passing the corresponding `--system` argument: |
| 33 | +To obtain a haskell development shell for GHC 8.10.7 including `cabal-install`, |
| 34 | +as well as `hls` and `hlint`. If you are on macOS on an Apple Silicon chip |
| 35 | +(M1, M2, ...), and want to switch between Intel (x86_64) and Apple Silicon |
| 36 | +(aarch64), you can do this by simply passing the corresponding |
| 37 | +`--system` argument: |
23 | 38 | ```bash
|
24 | 39 | nix develop github:input-output-hk/devx#ghc810 --no-write-lock-file --refresh --system x86_64-darwin
|
25 | 40 | # ... or:
|
|
0 commit comments