aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/installation
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/src/installation')
-rw-r--r--doc/manual/src/installation/building-source.md11
-rw-r--r--doc/manual/src/installation/env-variables.md2
-rw-r--r--doc/manual/src/installation/installing-binary.md24
-rw-r--r--doc/manual/src/installation/installing-docker.md59
-rw-r--r--doc/manual/src/installation/installing-source.md4
-rw-r--r--doc/manual/src/installation/obtaining-source.md15
-rw-r--r--doc/manual/src/installation/prerequisites-source.md21
-rw-r--r--doc/manual/src/installation/supported-platforms.md2
8 files changed, 110 insertions, 28 deletions
diff --git a/doc/manual/src/installation/building-source.md b/doc/manual/src/installation/building-source.md
index d21a51a82..ed1efffd8 100644
--- a/doc/manual/src/installation/building-source.md
+++ b/doc/manual/src/installation/building-source.md
@@ -1,9 +1,9 @@
# Building Nix from Source
-After unpacking or checking out the Nix sources, issue the following
-commands:
+After cloning Nix's Git repository, issue the following commands:
```console
+$ ./bootstrap.sh
$ ./configure options...
$ make
$ make install
@@ -11,13 +11,6 @@ $ make install
Nix requires GNU Make so you may need to invoke `gmake` instead.
-When building from the Git repository, these should be preceded by the
-command:
-
-```console
-$ ./bootstrap.sh
-```
-
The installation path can be specified by passing the `--prefix=prefix`
to `configure`. The default installation directory is `/usr/local`. You
can change this to any location you like. You must have write permission
diff --git a/doc/manual/src/installation/env-variables.md b/doc/manual/src/installation/env-variables.md
index 4a49897e4..bb35c0e9f 100644
--- a/doc/manual/src/installation/env-variables.md
+++ b/doc/manual/src/installation/env-variables.md
@@ -40,7 +40,7 @@ export NIX_SSL_CERT_FILE=/etc/ssl/my-certificate-bundle.crt
> **Note**
>
> You must not add the export and then do the install, as the Nix
-> installer will detect the presense of Nix configuration, and abort.
+> installer will detect the presence of Nix configuration, and abort.
## `NIX_SSL_CERT_FILE` with macOS and the Nix daemon
diff --git a/doc/manual/src/installation/installing-binary.md b/doc/manual/src/installation/installing-binary.md
index 96fa34635..4367654a2 100644
--- a/doc/manual/src/installation/installing-binary.md
+++ b/doc/manual/src/installation/installing-binary.md
@@ -119,6 +119,30 @@ this to run the installer, but it may help if you run into trouble:
- update `/etc/synthetic.conf` to direct macOS to create a "synthetic"
empty root directory to mount your volume
- specify mount options for the volume in `/etc/fstab`
+ - `rw`: read-write
+ - `noauto`: prevent the system from auto-mounting the volume (so the
+ LaunchDaemon mentioned below can control mounting it, and to avoid
+ masking problems with that mounting service).
+ - `nobrowse`: prevent the Nix Store volume from showing up on your
+ desktop; also keeps Spotlight from spending resources to index
+ this volume
+ <!-- TODO:
+ - `suid`: honor setuid? surely not? ...
+ - `owners`: honor file ownership on the volume
+
+ For now I'll avoid pretending to understand suid/owners more
+ than I do. There've been some vague reports of file-ownership
+ and permission issues, particularly in cloud/VM/headless setups.
+ My pet theory is that this has something to do with these setups
+ not having a token that gets delegated to initial/admin accounts
+ on macOS. See scripts/create-darwin-volume.sh for a little more.
+
+ In any case, by Dec 4 2021, it _seems_ like some combination of
+ suid, owners, and calling diskutil enableOwnership have stopped
+ new reports from coming in. But I hesitate to celebrate because we
+ haven't really named and catalogued the behavior, understood what
+ we're fixing, and validated that all 3 components are essential.
+ -->
- if you have FileVault enabled
- generate an encryption password
- put it in your system Keychain
diff --git a/doc/manual/src/installation/installing-docker.md b/doc/manual/src/installation/installing-docker.md
new file mode 100644
index 000000000..9d6d8f2d9
--- /dev/null
+++ b/doc/manual/src/installation/installing-docker.md
@@ -0,0 +1,59 @@
+# Using Nix within Docker
+
+To run the latest stable release of Nix with Docker run the following command:
+
+```console
+$ docker run -ti nixos/nix
+Unable to find image 'nixos/nix:latest' locally
+latest: Pulling from nixos/nix
+5843afab3874: Pull complete
+b52bf13f109c: Pull complete
+1e2415612aa3: Pull complete
+Digest: sha256:27f6e7f60227e959ee7ece361f75d4844a40e1cc6878b6868fe30140420031ff
+Status: Downloaded newer image for nixos/nix:latest
+35ca4ada6e96:/# nix --version
+nix (Nix) 2.3.12
+35ca4ada6e96:/# exit
+```
+
+# What is included in Nix's Docker image?
+
+The official Docker image is created using `pkgs.dockerTools.buildLayeredImage`
+(and not with `Dockerfile` as it is usual with Docker images). You can still
+base your custom Docker image on it as you would do with any other Docker
+image.
+
+The Docker image is also not based on any other image and includes minimal set
+of runtime dependencies that are required to use Nix:
+
+ - pkgs.nix
+ - pkgs.bashInteractive
+ - pkgs.coreutils-full
+ - pkgs.gnutar
+ - pkgs.gzip
+ - pkgs.gnugrep
+ - pkgs.which
+ - pkgs.curl
+ - pkgs.less
+ - pkgs.wget
+ - pkgs.man
+ - pkgs.cacert.out
+ - pkgs.findutils
+
+# Docker image with the latest development version of Nix
+
+To get the latest image that was built by [Hydra](https://hydra.nixos.org) run
+the following command:
+
+```console
+$ curl -L https://hydra.nixos.org/job/nix/master/dockerImage.x86_64-linux/latest/download/1 | docker load
+$ docker run -ti nix:2.5pre20211105
+```
+
+You can also build a Docker image from source yourself:
+
+```console
+$ nix build ./\#hydraJobs.dockerImage.x86_64-linux
+$ docker load -i ./result/image.tar.gz
+$ docker run -ti nix:2.5pre20211105
+```
diff --git a/doc/manual/src/installation/installing-source.md b/doc/manual/src/installation/installing-source.md
index e52d38a03..09b4e4887 100644
--- a/doc/manual/src/installation/installing-source.md
+++ b/doc/manual/src/installation/installing-source.md
@@ -1,4 +1,4 @@
# Installing Nix from Source
-If no binary package is available, you can download and compile a source
-distribution.
+If no binary package is available or if you want to hack on Nix, you
+can build Nix from its Git repository.
diff --git a/doc/manual/src/installation/obtaining-source.md b/doc/manual/src/installation/obtaining-source.md
index 0a906e390..da05d243d 100644
--- a/doc/manual/src/installation/obtaining-source.md
+++ b/doc/manual/src/installation/obtaining-source.md
@@ -1,14 +1,9 @@
-# Obtaining a Source Distribution
+# Obtaining the Source
-The source tarball of the most recent stable release can be downloaded
-from the [Nix homepage](http://nixos.org/nix/download.html). You can
-also grab the [most recent development
-release](http://hydra.nixos.org/job/nix/master/release/latest-finished#tabs-constituents).
-
-Alternatively, the most recent sources of Nix can be obtained from its
-[Git repository](https://github.com/NixOS/nix). For example, the
-following command will check out the latest revision into a directory
-called `nix`:
+The most recent sources of Nix can be obtained from its [Git
+repository](https://github.com/NixOS/nix). For example, the following
+command will check out the latest revision into a directory called
+`nix`:
```console
$ git clone https://github.com/NixOS/nix
diff --git a/doc/manual/src/installation/prerequisites-source.md b/doc/manual/src/installation/prerequisites-source.md
index 40cb79627..6f4eb3008 100644
--- a/doc/manual/src/installation/prerequisites-source.md
+++ b/doc/manual/src/installation/prerequisites-source.md
@@ -2,9 +2,8 @@
- GNU Autoconf (<https://www.gnu.org/software/autoconf/>) and the
autoconf-archive macro collection
- (<https://www.gnu.org/software/autoconf-archive/>). These are only
- needed to run the bootstrap script, and are not necessary if your
- source distribution came with a pre-built `./configure` script.
+ (<https://www.gnu.org/software/autoconf-archive/>). These are
+ needed to run the bootstrap script.
- GNU Make.
@@ -45,6 +44,11 @@
obtained from the its repository
<https://github.com/troglobit/editline>.
+ - The `libsodium` library for verifying cryptographic signatures
+ of contents fetched from binary caches.
+ It can be obtained from the official web site
+ <https://libsodium.org>.
+
- Recent versions of Bison and Flex to build the parser. (This is
because Nix needs GLR support in Bison and reentrancy support in
Flex.) For Bison, you need version 2.6, which can be obtained from
@@ -52,11 +56,18 @@
you need version 2.5.35, which is available on
[SourceForge](http://lex.sourceforge.net/). Slightly older versions
may also work, but ancient versions like the ubiquitous 2.5.4a
- won't. Note that these are only required if you modify the parser or
- when you are building from the Git repository.
+ won't.
- The `libseccomp` is used to provide syscall filtering on Linux. This
is an optional dependency and can be disabled passing a
`--disable-seccomp-sandboxing` option to the `configure` script (Not
recommended unless your system doesn't support `libseccomp`). To get
the library, visit <https://github.com/seccomp/libseccomp>.
+
+ - On 64-bit x86 machines only, `libcpuid` library
+ is used to determine which microarchitecture levels are supported
+ (e.g., as whether to have `x86_64-v2-linux` among additional system types).
+ The library is available from its homepage
+ <http://libcpuid.sourceforge.net>.
+ This is an optional dependency and can be disabled
+ by providing a `--disable-cpuid` to the `configure` script.
diff --git a/doc/manual/src/installation/supported-platforms.md b/doc/manual/src/installation/supported-platforms.md
index 8ef1f0e78..8ca3ce8d4 100644
--- a/doc/manual/src/installation/supported-platforms.md
+++ b/doc/manual/src/installation/supported-platforms.md
@@ -4,4 +4,4 @@ Nix is currently supported on the following platforms:
- Linux (i686, x86\_64, aarch64).
- - macOS (x86\_64).
+ - macOS (x86\_64, aarch64).