From c6bbcdd70dc4facaccb73232f6a879e6afab931b Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Mon, 21 Oct 2024 17:25:53 +0200 Subject: [PATCH] Revamp project README (#1239) * Revamp initial paragraphs * More small fixes * Make curl commands multi-line * Add Determinate instructions * Fix broken links * Make features section more prominent * Separate community involvement section * Fewer links in first paragraph * Update millions * Fix DDS link --- README.md | 370 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 209 insertions(+), 161 deletions(-) diff --git a/README.md b/README.md index f69b1e2d6..38ae1f104 100644 --- a/README.md +++ b/README.md @@ -1,97 +1,97 @@ -# The Determinate Nix Installer +# Determinate Nix Installer [![Crates.io](https://img.shields.io/crates/v/nix-installer)](https://crates.io/crates/nix-installer) -[![Docs.rs](https://img.shields.io/docsrs/nix-installer)](https://docs.rs/nix-installer/latest/nix_installer/) +[![Docs.rs](https://img.shields.io/docsrs/nix-installer)](https://docs.rs/nix-installer/latest/nix_installer) -A fast, friendly, and reliable tool to help you use [Nix] with Flakes everywhere. +**Determinate Nix Installer** is a fast, friendly, and reliable way to install and manage [Nix] everywhere, including macOS, Linux, Windows Subsystem for Linux (WSL), SELinux, the Valve Steam Deck, and more. +It installs Nix with [flakes] enabled by default, it offers support for seamlessly [uninstalling Nix](#uninstalling), it enables Nix to survive [macOS upgrades][macos-upgrades], and [much more](#features). -```bash -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install +This one-liner is the quickest way to get started on any supported system: + +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + sh -s -- install ``` -The `nix-installer` has successfully completed over 2,000,000 installs in a number of environments, including [Github Actions](#as-a-github-action) and [GitLab](#on-gitlab): +> [!TIP] +> To install [Determinate] using the installer, see the instructions [below](#install-determinate). -| Platform | Multi User | `root` only | Maturity | -| -------------------------- | :---------------: | :---------: | :---------------: | -| Linux (x86_64 & aarch64) | ✓ (via [systemd]) | ✓ | Stable | -| MacOS (x86_64 & aarch64) | ✓ | | Stable (See note) | -| Valve Steam Deck (SteamOS) | ✓ | | Stable | -| WSL2 (x86_64 & aarch64) | ✓ (via [systemd]) | ✓ | Stable | -| Podman Linux Containers | ✓ (via [systemd]) | ✓ | Stable | -| Docker Containers | | ✓ | Stable | +Determinate Nix Installer has successfully completed over **7 million** installs in a number of environments, including [Github Actions](#as-a-github-action) and [GitLab](#on-gitlab): -> [!NOTE] -> On **MacOS only**, removing users and/or groups may fail if there are no users who are logged in graphically. +| Platform | Multi user? | `root` only | Maturity | +| -------------------------------------------------------------------- | :---------------: | :---------: | :---------------: | +| Linux (`x86_64` and `aarch64`) | ✓ (via [systemd]) | ✓ | Stable | +| MacOS (`x86_64` and `aarch64`) | ✓ | | Stable (see note) | +| [Valve Steam Deck][steam-deck] (SteamOS) | ✓ | | Stable | +| [Windows Subsystem for Linux][wsl] 2 (WSL2) (`x86_64` and `aarch64`) | ✓ (via [systemd]) | ✓ | Stable | +| [Podman] Linux containers | ✓ (via [systemd]) | ✓ | Stable | +| [Docker] containers | | ✓ | Stable | -## Usage +## Install Nix -Install Nix with the default planner and options: +You can install Nix with the default [planner](#planners) and options by running this script: -```bash -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + sh -s -- install ``` -Or, to download a platform specific Installer binary yourself: +To download a platform-specific installer binary yourself: -```bash -$ curl -sL -o nix-installer https://install.determinate.systems/nix/nix-installer-x86_64-linux -$ chmod +x nix-installer -$ ./nix-installer +```shell +curl -sL -o nix-installer https://install.determinate.systems/nix/nix-installer-x86_64-linux +chmod +x nix-installer +./nix-installer ``` -`nix-installer` installs Nix by following a _plan_ made by a _planner_. Review the available planners: - -```bash -foo@ubuntuserver2204:~$ ./nix-installer install --help -Install Nix using a planner +This would install Nix on an `x86_64-linux` system but you can replace that with the system of your choice. -By default, an appropriate planner is heuristically determined based on the system. +### Install Determinate -Some planners have additional options which can be set from the planner's subcommand. +If you're on macOS (but not [nix-darwin]) or Linux (but not [NixOS]), you can install [Determinate] using Determinate Nix Installer by adding the `--determinate` flag: -Usage: nix-installer install [OPTIONS] [PLAN] - nix-installer install - -Commands: - linux A planner for traditional, mutable Linux systems like Debian, RHEL, or Arch - steam-deck A planner for the Valve Steam Deck running SteamOS - ostree A planner suitable for immutable systems using ostree, such as Fedora Silverblue - help Print this message or the help of the given subcommand(s) -# ... +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + sh -s -- install --determinate ``` -Planners have their own options and defaults, sharing most of them in common: +> [!TIP] +> If you use [nix-darwin] or [NixOS], we recommend installing Determinate using modules provided by the [`determinate` flake][determinate-flake]. -```bash -$ ./nix-installer install linux --help -A planner for Linux installs +Determinate is: -Usage: nix-installer install linux [OPTIONS] +- [**Determinate Nix**][det-nix], [Determinate Systems][detsys]' validated and secure downstream Nix distribution for enterprises. +- [**FlakeHub**][flakehub], a platform for publishing and discovering [Nix flakes][flakes] that provides features like [semantic versioning][semver] (SemVer) for flakes, [private flakes][private-flakes], and [FlakeHub Cache][cache]. -Options: -# ... - --nix-build-group-name - The Nix build group name +### Planners - [env: NIX_INSTALLER_NIX_BUILD_GROUP_NAME=] - [default: nixbld] +Determinate Nix Installer installs Nix by following a _plan_ made by a _planner_. +To review the available planners: - --nix-build-group-id - The Nix build group GID +```shell +/nix/nix-installer install --help +``` - [env: NIX_INSTALLER_NIX_BUILD_GROUP_ID=] - [default: 3000] -# ... +Planners have their own options and defaults, sharing most of them in common. +To see the options for Linux, for example: + +```shell +/nix/nix-installer install linux --help ``` -Planners can be configured via environment variable or command arguments: +You can configure planners using environment variables or command arguments: + +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + NIX_BUILD_GROUP_NAME=nixbuilder sh -s -- install --nix-build-group-id 4000 + +# Alternatively: -```bash -$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | NIX_BUILD_GROUP_NAME=nixbuilder sh -s -- install --nix-build-group-id 4000 -# Or... -$ NIX_BUILD_GROUP_NAME=nixbuilder ./nix-installer install --nix-build-group-id 4000 +NIX_BUILD_GROUP_NAME=nixbuilder ./nix-installer install --nix-build-group-id 4000 ``` +See [Installer settings](#installer-settings) below for a full list of options. + ### Troubleshooting Having problems with the installer? @@ -101,23 +101,24 @@ Consult our [troubleshooting guide](./docs/troubleshooting.md) to see if your pr You can upgrade Nix to [our currently recommended version of Nix][recommended-nix] by running: -``` +```shell sudo -i nix upgrade-nix ``` -Alternatively, you can [uninstall](#uninstalling) and [reinstall](#usage) with a different version of the `nix-installer`. +Alternatively, you can [uninstall](#uninstalling) and [reinstall](#install-nix) with a different version of Determinate Nix Installer. ### Uninstalling -You can remove a `nix-installer`-installed Nix by running +You can remove Nix installed by Determinate Nix Installer by running: -```bash +```shell /nix/nix-installer uninstall ``` ### As a Github Action -You can use the [`nix-installer-action`](https://github.com/DeterminateSystems/nix-installer-action) Github Action like so: +You can install Nix on [GitHub Actions][actions] using [`nix-installer-action`][nix-installer-action]. +Here's an example configuration: ```yaml on: @@ -126,7 +127,7 @@ on: branches: [main] jobs: - lints: + build: name: Build runs-on: ubuntu-22.04 steps: @@ -139,9 +140,10 @@ jobs: ### On GitLab -GitLab CI runners are typically Docker based and run as the `root` user. This means `systemd` is not present, so the `--init none` option needs to be passed to the Linux planner. +[GitLab CI][gitlab-ci] runners are typically [Docker] based and run as the `root` user. +This means that `systemd` is not present, so you need to pass the `--init none` option to the Linux planner. -On the default [GitLab.com](https://gitlab.com/) runners, `nix` can be installed and used like so: +On the default [GitLab] runners, you can install Nix using this configuration: ```yaml test: @@ -160,26 +162,27 @@ If you are using different runners, the above example may need to be adjusted. > [!WARNING] > When `--init none` is used, _only_ `root` or users who can elevate to `root` privileges can run Nix: > -> ```bash +> ```shell > sudo -i nix run nixpkgs#hello > ``` If you don't use [systemd], you can still install Nix by explicitly specifying the `linux` plan and `--init none`: -```bash -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + sh -s -- install linux --init none ``` ### In a container -In Docker/Podman containers or WSL2 instances where an init (like `systemd`) is not present, pass `--init none`. +In [Docker]/[Podman] containers or [WSL2][wsl] instances where an init (like `systemd`) is not present, pass `--init none`. For containers (without an init): > [!WARNING] > When `--init none` is used, _only_ `root` or users who can elevate to `root` privileges can run Nix: > -> ```bash +> ```shell > sudo -i nix run nixpkgs#hello > ``` @@ -196,7 +199,7 @@ ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" RUN nix run nixpkgs#hello ``` -```bash +```shell docker build -t ubuntu-with-nix . docker run --rm -ti ubuntu-with-nix docker rmi ubuntu-with-nix @@ -206,7 +209,7 @@ podman run --rm -ti ubuntu-with-nix podman rmi ubuntu-with-nix ``` -For containers with a systemd init: +For containers with a [systemd] init: ```dockerfile # Dockerfile @@ -222,7 +225,7 @@ RUN nix run nixpkgs#hello CMD [ "/bin/systemd" ] ``` -```bash +```shell podman build -t ubuntu-systemd-with-nix . IMAGE=$(podman create ubuntu-systemd-with-nix) CONTAINER=$(podman start $IMAGE) @@ -231,14 +234,16 @@ podman rm -f $CONTAINER podman rmi $IMAGE ``` -On some container tools, such as `docker`, `sandbox = false` can be omitted. Omitting it will negatively impact compatibility with container tools like `podman`. +With some container tools, such as [Docker], you can omit `sandbox = false`. +Omitting this will negatively impact compatibility with container tools like [Podman]. ### In WSL2 -We **strongly recommend** [enabling systemd](https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#how-can-you-get-systemd-on-your-machine), then installing Nix as normal: +We **strongly recommend** first [enabling systemd][enabling-systemd] and then installing Nix as normal: -```bash -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + sh -s -- install ``` If [WSLg][wslg] is enabled, you can do things like open a Linux Firefox from Windows on Powershell: @@ -258,42 +263,70 @@ If enabling systemd is not an option, pass `--init none` at the end of the comma > [!WARNING] > When `--init none` is used, _only_ `root` or users who can elevate to `root` privileges can run Nix: > -> ```bash +> ```shell > sudo -i nix run nixpkgs#hello > ``` -```bash -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + sh -s -- install linux --init none ``` ### Skip confirmation If you'd like to bypass the confirmation step, you can apply the `--no-confirm` flag: -```bash -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm +```shell +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ + sh -s -- install --no-confirm ``` This is especially useful when using the installer in non-interactive scripts. +## Features + +Existing Nix installation scripts do a good job but they are difficult to maintain. + +Subtle differences in the shell implementations and tool used in the scripts make it difficult to make meaningful changes to the installer. + +Determinate Nix installer has numerous advantages over these options: + +- It installs Nix with [flakes] enabled by default +- It enables Nix to survive macOS upgrades +- It keeps an installation _receipt_ for easy [uninstallation](#uninstalling) +- It uses [planners](#planners) to create appropriate install plans for complicated targets—plans that you can review prior to installation +- It enables you to perform a best-effort reversion in the facing of a failed install +- It improves installation performance by maximizing parallel operations +- It supports na expanded test suite including "curing" cases (compatibility with Nix already on the system) +- It supports SELinux and OSTree-based distributions without asking users to make compromises +- It operates as a single, static binary with external dependencies such as [OpenSSL], only calling existing system tools (like `useradd`) when necessary +- As a macOS remote build target, it ensures that Nix is present on the `PATH` + +## Nix community involvement + +It has been wonderful to collaborate with other participants in the [Nix Installer Working Group][wg] and members of the broader community. +The working group maintains a [foundation-owned fork of the installer][forked-installer]. + ## Quirks -While `nix-installer` tries to provide a comprehensive and unquirky experience, there are unfortunately some issues which may require manual intervention or operator choices. +While Determinate Nix Installer tries to provide a comprehensive and unquirky experience, there are unfortunately some issues that may require manual intervention or operator choices. -### Using MacOS after removing `nix` while `nix-darwin` was still installed, network requests fail +### Using MacOS after removing Nix while nix-darwin was still installed, network requests fail -If `nix` was previously uninstalled without uninstalling `nix-darwin` first, users may experience errors similar to this: +If Nix was previously uninstalled without uninstalling [nix-darwin] first, you may experience errors similar to this: + +```shell +nix shell nixpkgs#curl -```bash -$ nix shell nixpkgs#curl error: unable to download 'https://cache.nixos.org/g8bqlgmpa4yg601w561qy2n576i6g0vh.narinfo': Problem with the SSL CA cert (path? access rights?) (77) ``` This occurs because `nix-darwin` provisions an `org.nixos.activate-system` service which remains after Nix is uninstalled. The `org.nixos.activate-system` service in this state interacts with the newly installed Nix and changes the SSL certificates it uses to be a broken symlink. -```bash -$ ls -lah /etc/ssl/certs +```shell +ls -lah /etc/ssl/certs + total 0 drwxr-xr-x 3 root wheel 96B Oct 17 08:26 . drwxr-xr-x 6 root wheel 192B Sep 16 06:28 .. @@ -304,24 +337,24 @@ The problem is compounded by the matter that the [`nix-darwin` uninstaller](http It's possible to resolve this situation by removing the `org.nixos.activate-system` service and the `ca-certificates`: -```bash -$ sudo rm /Library/LaunchDaemons/org.nixos.activate-system.plist -$ sudo launchctl bootout system/org.nixos.activate-system -$ /nix/nix-installer uninstall -$ sudo rm /etc/ssl/certs/ca-certificates.crt +```shell +sudo rm /Library/LaunchDaemons/org.nixos.activate-system.plist +sudo launchctl bootout system/org.nixos.activate-system +/nix/nix-installer uninstall +sudo rm /etc/ssl/certs/ca-certificates.crt ``` -Then run the `nix-installer` again, and it should work. +Run the installer again and it should work. -Up-to-date versions of the `nix-installer` will refuse to uninstall until `nix-darwin` is uninstalled first, helping mitigate this problem. +Up-to-date versions of the installer will refuse to uninstall until [nix-darwin] is uninstalled first, helping to mitigate this problem. ## Building a binary -Since you'll be using `nix-installer` to install Nix on systems without Nix, the default build is a static binary. +Since you'll be using the installer to install Nix on systems without Nix, the default build is a static binary. -Build a portable Linux binary on a system with Nix: +To build a portable Linux binary on a system with Nix: -```bash +```shell # to build a local copy nix build -L ".#nix-installer-static" # to build the remote main development branch @@ -331,9 +364,9 @@ export NIX_INSTALLER_TAG="v0.6.0" nix build -L "github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer-static" ``` -On Mac: +On macOS: -```bash +```shell # to build a local copy nix build -L ".#nix-installer" # to build the remote main development branch @@ -343,11 +376,10 @@ export NIX_INSTALLER_TAG="v0.6.0" nix build -L "github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer" ``` -Then copy the `result/bin/nix-installer` to the machine you wish to run it on. +Then copy `result/bin/nix-installer` to the machine you wish to run it on. +You can also add the installer to a system without Nix using [cargo], as there are no system dependencies to worry about: -You can also add `nix-installer` to a system without Nix via `cargo`, there are no system dependencies to worry about: - -```bash +```shell # to build and run a local copy RUSTFLAGS="--cfg tokio_unstable" cargo run -- --help # to build the remote main development branch @@ -359,25 +391,27 @@ RUSTFLAGS="--cfg tokio_unstable" cargo install --git https://github.com/Determin nix-installer --help ``` -To make this build portable, pass ` --target x86_64-unknown-linux-musl`. +To make this build portable, pass the `--target x86_64-unknown-linux-musl` option. > [!NOTE] > We currently require `--cfg tokio_unstable` as we utilize [Tokio's process groups](https://docs.rs/tokio/1.24.1/tokio/process/struct.Command.html#method.process_group), which wrap stable `std` APIs, but are unstable due to it requiring an MSRV bump. -## As a library +## As a Rust library > [!WARNING] -> Use as a library is still experimental. This feature is likely to be removed in the future without an advocate. If you're using this, please let us know and we can make a path to stabilization. +> Using Determinate Nix Installer as a [Rust] library is still experimental. +> This feature is likely to be removed in the future without an advocate. +> If you're using this, please let us know and we can provide a path to stabilization. -Add `nix-installer` to your dependencies: +Add the [`nix-installer` library][lib] to your dependencies: -```bash +```shell cargo add nix-installer ``` -If you are **building a CLI**, check out the `cli` feature flag for `clap` integration. +If you're building a CLI, check out the `cli` feature flag for [`clap`][clap] integration. -You'll also need to edit your `.cargo/config.toml` to use `tokio_unstable` as we utilize [Tokio's process groups](https://docs.rs/tokio/1.24.1/tokio/process/struct.Command.html#method.process_group), which wrap stable `std` APIs, but are unstable due to it requiring an MSRV bump: +You'll also need to edit your `.cargo/config.toml` to use `tokio_unstable` as we utilize [Tokio's process groups][process-groups], which wrap stable `std` APIs, but are unstable due to it requiring an MSRV bump: ```toml # .cargo/config.toml @@ -390,48 +424,51 @@ The contents are embedded in the resulting binary instead of downloaded at insta Then it's possible to review the [documentation](https://docs.rs/nix-installer/latest/nix_installer/): -```bash +```shell cargo doc --open -p nix-installer ``` -Documentation is also available via `nix` build: +Documentation is also available via `nix build`: -```bash +```shell nix build github:DeterminateSystems/nix-installer#nix-installer.doc firefox result-doc/nix-installer/index.html ``` ## Accessing other versions -For users who desire version pinning, the version of `nix-installer` to use can be specified in the `curl` command: +You can pin to a specific version of Determinate Nix Installer by modifying the download URL. +Here's an example: -```bash +```shell VERSION="v0.6.0" -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/${VERSION} | sh -s -- install +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/${VERSION} | \ + sh -s -- install ``` -To discover which versions are available, or download the binaries for any release, check the [Github Releases](https://github.com/DeterminateSystems/nix-installer/releases). +To discover which versions are available, or download the binaries for any release, check the [Github Releases][releases]. -These releases can be downloaded and used directly: +You can download and use these releases directly. +Here's an example: -```bash +```shell VERSION="v0.6.0" ARCH="aarch64-linux" curl -sSf -L https://github.com/DeterminateSystems/nix-installer/releases/download/${VERSION}/nix-installer-${ARCH} -o nix-installer ./nix-installer install ``` -Each installer version has an [associated supported nix version](src/settings.rs) -- if you pin the installer version, you'll also indirectly pin to the associated nix version. +Each installer version has an [associated supported nix version](src/settings.rs)—if you pin the installer version, you'll also indirectly pin to the associated nix version. -You can also override the `nix` version via `--nix-package-url` or `NIX_INSTALLER_NIX_PACKAGE_URL=` but doing so is not recommended since we haven't tested that combination. -Here are some example `nix` package URLs including nix version, OS and architecture: +You can also override the Nix version using `--nix-package-url` or `NIX_INSTALLER_NIX_PACKAGE_URL=` but doing this is not recommended since we haven't tested that combination. +Here are some example Nix package URLs, including the Nix version, OS, and architecture: - https://releases.nixos.org/nix/nix-2.18.1/nix-2.18.1-x86_64-linux.tar.xz - https://releases.nixos.org/nix/nix-2.18.1/nix-2.18.1-aarch64-darwin.tar.xz -## Installation Differences +## Installation differences -Differing from the upstream [Nix](https://github.com/NixOS/nix) installer scripts: +Differing from the upstream [Nix][upstream-nix] installer scripts: - In `nix.conf`: - the `nix-command` and `flakes` features are enabled @@ -445,30 +482,9 @@ Differing from the upstream [Nix](https://github.com/NixOS/nix) installer script - `nix-channel --update` is not run, `~/.nix-channels` is not provisioned - `ssl-cert-file` is set in `/etc/nix/nix.conf` if the `ssl-cert-file` argument is used. -## Motivations - -The existing upstream scripts do a good job, however they are difficult to maintain. - -Subtle differences in the shell implementations and tool used in the scripts make it difficult to make meaningful changes to the installer. - -The Determinate Nix installer has numerous advantages: - -- survives macOS upgrades -- keeping an installation receipt for easy uninstallation -- offering users a chance to review an accurate, calculated install plan -- having 'planners' which can create appropriate install plans for complicated targets -- offering users with a failing install the chance to do a best-effort revert -- improving performance by maximizing parallel operations -- supporting a expanded test suite including 'curing' cases -- supporting SELinux and OSTree based distributions without asking users to make compromises -- operating as a single, static binary with external dependencies such as `openssl`, only calling existing system tools (like `useradd`) where necessary -- As a MacOS remote build target, ensures `nix` is not absent from path - -It has been wonderful to collaborate with other participants in the Nix Installer Working Group and members of the broader community. The working group maintains a [foundation owned fork of the installer](https://github.com/nixos/experimental-nix-installer/). - ## Installer settings -The Determinate Nix Installer provides a variety of configuration settings, some [general](#general-settings) and some on a per-command basis. +Determinate Nix Installer provides a variety of configuration settings, some [general](#general-settings) and some on a per-command basis. All settings are available via flags or via `NIX_INSTALLER_*` environment variables. ### General settings @@ -485,11 +501,12 @@ These settings are available for all commands. | Flag(s) | Description | Default (if any) | Environment variable | | -------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------- | +| `--determinate` | Installs [Determinate] | `NIX_INSTALLER_DETERMINATE` | | `--diagnostic-attribution` | Relate the install diagnostic to a specific value | | `NIX_INSTALLER_DIAGNOSTIC_ATTRIBUTION` | | `--diagnostic-endpoint` | The URL or file path for an installation diagnostic to be sent | `https://install.determinate.systems/nix/diagnostic` | `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT` | | `--explain` | Provide an explanation of the changes the installation process will make to your system | `false` | `NIX_INSTALLER_EXPLAIN` | | `--extra-conf` | Extra configuration lines for `/etc/nix.conf` | | `NIX_INSTALLER_EXTRA_CONF` | -| `--force` | If `nix-installer` should forcibly recreate files it finds existing | `false` | `NIX_INSTALLER_FORCE` | +| `--force` | Whether the installer should forcibly recreate files it finds existing | `false` | `NIX_INSTALLER_FORCE` | | `--init` | Which init system to configure (if `--init none` Nix will be root-only) | `launchd` (macOS), `systemd` (Linux) | `NIX_INSTALLER_INIT` | | `--nix-build-group-id` | The Nix build group GID | `350` (macOS), `30000` (Linux) | `NIX_INSTALLER_NIX_BUILD_GROUP_ID` | | `--nix-build-group-name` | The Nix build group name | `nixbld` | `NIX_INSTALLER_NIX_BUILD_GROUP_NAME` | @@ -546,14 +563,14 @@ nix-installer uninstall /path/to/receipt.json ## Diagnostics -The goal of the Determinate Nix Installer is to successfully and correctly install Nix. +The goal of Determinate Nix Installer is to successfully and correctly install Nix. The `curl | sh` pipeline and the installer collects a little bit of diagnostic information to help us make that true. Here is a table of the [diagnostic data we collect][diagnosticdata]: | Field | Use | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `version` | The version of the Determinate Nix Installer. | +| `version` | The version of Determinate Nix Installer. | | `planner` | The method of installing Nix (`linux`, `macos`, `steam-deck`) | | `configured_settings` | The names of planner settings which were changed from their default. Does _not_ include the values. | | `os_name` | The running operating system. | @@ -567,13 +584,44 @@ Here is a table of the [diagnostic data we collect][diagnosticdata]: To disable diagnostic reporting, set the diagnostics URL to an empty string by passing `--diagnostic-endpoint=""` or setting `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT=""`. -You can read the full privacy policy for [Determinate Systems][detsys], the creators of the Determinate Nix Installer, [here][privacy]. - -[detsys]: https://determinate.systems/ +You can read the full privacy policy for [Determinate Systems][detsys], the creators of Determinate Nix Installer, [here][privacy]. + +[actions]: https://github.com/features/actions +[cache]: https://docs.determinate.systems/flakehub/cache +[cargo]: https://doc.rust-lang.org/cargo +[clap]: https://clap.rs +[det-nix]: https://docs.determinate.systems/determinate-nix +[determinate]: https://docs.determinate.systems +[determinate-flake]: https://github.com/DeterminateSystems/determinate +[detsys]: https://determinate.systems +[docker]: https://docker.com [diagnosticdata]: https://github.com/DeterminateSystems/nix-installer/blob/f9f927840d532b71f41670382a30cfcbea2d8a35/src/diagnostics.rs#L29-L43 +[enabling-systemd]: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#how-can-you-get-systemd-on-your-machine +[flakehub]: https://flakehub.com +[flakes]: https://zero-to-nix.com/concepts/flakes +[forked-installer]: https://github.com/nixos/experimental-nix-installer +[gitlab]: https://gitlab.com +[gitlab-ci]: https://docs.gitlab.com/ee/ci +[lib]: https://docs.rs/nix-installer +[macos-upgrades]: https://determinate.systems/posts/nix-survival-mode-on-macos/ +[nix]: https://nixos.org +[nix-darwin]: https://github.com/LnL7/nix-darwin +[nix-installer-action]: https://github.com/DeterminateSystems/nix-installer-action +[nixgl]: https://github.com/guibou/nixGL +[nixos]: https://zero-to-nix.com/concepts/nixos +[openssl]: https://openssl.org +[podman]: https://podman.io [privacy]: https://determinate.systems/policies/privacy +[private-flakes]: https://docs.determinate.systems/flakehub/private-flakes +[process-groups]: https://docs.rs/tokio/1.24.1/tokio/process/struct.Command.html#method.process_group [recommended-nix]: https://github.com/DeterminateSystems/nix/releases/latest +[releases]: https://github.com/DeterminateSystems/nix-installer/releases +[rust]: https://rust-lang.org +[selinux]: https://selinuxproject.org +[semver]: https://docs.determinate.systems/flakehub/concepts/semver +[steam-deck]: https://store.steampowered.com/steamdeck [systemd]: https://systemd.io +[upstream-nix]: https://github.com/NixOS/nix +[wg]: https://discourse.nixos.org/t/nix-installer-workgroup/21495 +[wsl]: https://learn.microsoft.com/en-us/windows/wsl/about [wslg]: https://github.com/microsoft/wslg -[nixgl]: https://github.com/guibou/nixGL -[Nix]: https://nixos.org