Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions, typo fixes, etc. #7885

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions doc/manual/src/SUMMARY.md.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Table of Contents

- [Introduction](introduction.md)
- [Quick Start](quick-start.md)
- [Quick Start](quick-start.md)
- [Contributing](contributing/contributing.md)
- [Hacking](contributing/hacking.md)
- [CLI guideline](contributing/cli-guideline.md)
- [Contributing to these docs](contributing/to-docs.md)
- [Installation](installation/installation.md)
- [Supported Platforms](installation/supported-platforms.md)
- [Installing a Binary Distribution](installation/installing-binary.md)
- [Using the official install script](installation/via-install-script.md)
- [Install a specific Nix version](installation/specific-nix-version.md)
- [Installing from a binary tarball](installation/from-tarball.md)
- [Installing Nix from Source](installation/installing-source.md)
- [Prerequisites](installation/prerequisites-source.md)
- [Obtaining a Source Distribution](installation/obtaining-source.md)
Expand All @@ -15,6 +22,7 @@
- [Multi-User Mode](installation/multi-user.md)
- [Environment Variables](installation/env-variables.md)
- [Upgrading Nix](installation/upgrading.md)
- [Uninstallation](uninstallation/uninstallation.md)
- [Package Management](package-management/package-management.md)
- [Basic Package Management](package-management/basic-package-mgmt.md)
- [Profiles](package-management/profiles.md)
Expand Down Expand Up @@ -49,6 +57,7 @@
- [nix-shell](command-ref/nix-shell.md)
- [nix-store](command-ref/nix-store.md)
- [Utilities](command-ref/utilities.md)
- [install script](command-ref/nix-install.md)
- [nix-channel](command-ref/nix-channel.md)
- [nix-collect-garbage](command-ref/nix-collect-garbage.md)
- [nix-copy-closure](command-ref/nix-copy-closure.md)
Expand All @@ -62,9 +71,6 @@
- [nix.conf](command-ref/conf-file.md)
- [Architecture](architecture/architecture.md)
- [Glossary](glossary.md)
- [Contributing](contributing/contributing.md)
- [Hacking](contributing/hacking.md)
- [CLI guideline](contributing/cli-guideline.md)
- [Release Notes](release-notes/release-notes.md)
- [Release X.Y (202?-??-??)](release-notes/rl-next.md)
- [Release 2.13 (2023-01-17)](release-notes/rl-2.13.md)
Expand Down
63 changes: 63 additions & 0 deletions doc/manual/src/command-ref/nix-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Name

`install` - The Nix installer

# Synopsis

`install` {`--daemon` | `--no-daemon` | `--yes` | `--no-channel-add` | `--no-modify-profile` | `-daemon-user-count` [*number*] | `--nix-extra-conf-file` | `--tarball-url-prefix` [???] }

# Description

> PR_COMMENT This description is sloppy by choice; don't want to spend too much time on it if this page is rejected.

1. **`nix-install.sh`** (fictitious name!)

The shell script at https://nixos.org/nix/install (let's call it **`nix-install.sh`**) is built from [`scripts/install.in`](https://github.com/NixOS/nix/blob/924ef6761bbbc75fda3cf85dc1c8d782130291b4/scripts/install.in).

It provides the following options:

+ `--tarball-url-prefix`

From a comment: `Use this command-line option to fetch the tarballs using nar-serve or Cachix`

> PR_COMMENT no clue how to use this

2. **[`scripts/install-nix-from-closure.sh`][2]**

`nix-install.sh` will download the latest Nix release, unpack the tarball, and it seems that `install-nix-from-closure.sh` will be called at one point. It provides the following options:

+ `--daemon`

Installs and configures a background daemon that manages the store, providing multi-user support and better isolation for local builds. Both for security and reproducibility, this method is recommended if supported on your platform.

See https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation

+ `--no-daemon`

Simple, single-user installation that does not require root and is trivial to uninstall. (default)

+ `--yes`

Run the script non-interactively, accepting all prompts.

+ `--no-channel-add`

Don't add any channels. `nixpkgs-unstable` is installed by default.

+ `--no-modify-profile`

Don't modify the user profile to automatically load nix.

+ `--daemon-user-count`

Number of build users to create. Defaults to 32, if this option is not provided.

+ `--nix-extra-conf-file`

Path to nix.conf to prepend when installing `/etc/nix/nix.conf`

> PR_COMMENT Things to note here:
> + The install script is **not** provided by Nix (the application) but by the Nix project as a convencience to deploy Nix application (hence it will never show up in the Nix commands; the reason why I put this under Utilities.)
> + It is used indirectly most of the time via `curl`, `wget`, etc.
> + Building the Nix project repo will yield an install script that **can** be used directly. (TODO: Expand the "Build from source" sections)
> + Some aspects of the install script cannot be modified using options / flags, but only by editing the its source (as noted at several places in the Installation section). Corollary: Document that it is a two-stage process.
8 changes: 8 additions & 0 deletions doc/manual/src/contributing/to-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> PR_COMMENT Notes:
> + Untracked files won't go into build results (at least, they don't seem to do so for me; changed but uncommitted files are ok.)
> + A [discourse thread]() on how to build the docs from the repo; this is how I do it:
> ```
> nix build -vv .#nix^doc --extra-experimental-features nix-command --extra-experimental-features flakes
> ```
> It takes about 2m 40s, not sure what I'm doing wrong...
> + It should be noted that these docs use mdBook - and document where to find help because the docs I found wasn't much help... [Their docs](https://rust-lang.github.io/mdBook/) looks incomplete. E.g., how to link to other pages? I constantly get "link errors" when I do the same format that is used on the `command-ref` pages.
20 changes: 20 additions & 0 deletions doc/manual/src/installation/from-tarball.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Installing from a binary tarball

> PR_COMMENT TODO Add reference to the documentation of the install script.

You can also download a binary tarball that contains Nix and all its
dependencies. (This is what the install script at
<https://nixos.org/nix/install> does automatically.) You should unpack
it somewhere (e.g. in `/tmp`), and then run the script named `install`
inside the binary tarball:

```console
$ cd /tmp
$ tar xfj nix-1.8-x86_64-darwin.tar.bz2
$ cd nix-1.8-x86_64-darwin
$ ./install
```

If you need to edit the multi-user installation script to use different
group ID or a different user ID range, modify the variables set in the
file named `install-multi-user`.