{"id":14967847,"url":"https://github.com/nixos/experimental-nix-installer","last_synced_at":"2025-10-01T06:31:56.796Z","repository":{"id":163520972,"uuid":"639002175","full_name":"NixOS/experimental-nix-installer","owner":"NixOS","description":"An experimental fork of the Determinate Nix Installer to explore upstreaming.","archived":false,"fork":true,"pushed_at":"2024-10-27T22:25:03.000Z","size":20529,"stargazers_count":31,"open_issues_count":7,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-30T08:26:13.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"DeterminateSystems/nix-installer","license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NixOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"open_collective":"nixos"}},"created_at":"2023-05-10T14:49:04.000Z","updated_at":"2024-10-27T03:50:55.000Z","dependencies_parsed_at":"2023-09-24T02:03:59.808Z","dependency_job_id":"55d4ac3b-35de-4f92-a611-de73075707a8","html_url":"https://github.com/NixOS/experimental-nix-installer","commit_stats":{"total_commits":415,"total_committers":13,"mean_commits":"31.923076923076923","dds":"0.18554216867469875","last_synced_commit":"0405c9607bfa1bbd29454f5ac65844ac147e71af"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fexperimental-nix-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fexperimental-nix-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fexperimental-nix-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fexperimental-nix-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NixOS","download_url":"https://codeload.github.com/NixOS/experimental-nix-installer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234837055,"owners_count":18894525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:38:42.534Z","updated_at":"2025-10-01T06:31:56.788Z","avatar_url":"https://github.com/NixOS.png","language":"Rust","funding_links":["https://opencollective.com/nixos"],"categories":[],"sub_categories":[],"readme":"# An experimental fork of the Determinate Nix Installer, to play with upstreaming.\n\nNote, this is different from the Determinate Nix Installer, available at https://github.com/DeterminateSystems/nix-installer.\n\n## If you're having a problem with installing Nix, this repository is almost certainly the wrong place to record issues.\n\nIf you used the **official Nix install scripts**, report issues at https://github.com/NixOS/nix/issues.\n\nIf you used the **Determinate Nix Installer**, report issues at https://github.com/DeterminateSystems/nix-installer.\n\n---\n\n[![Crates.io](https://img.shields.io/crates/v/nix-installer)](https://crates.io/crates/nix-installer)\n[![Docs.rs](https://img.shields.io/docsrs/nix-installer)](https://docs.rs/nix-installer/latest/nix_installer)\n\n**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.\nIt 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).\n\nThis one-liner is the quickest way to get started on any supported system:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  sh -s -- install\n```\n\n\u003e [!TIP]\n\u003e To install [Determinate] using the installer, see the instructions [below](#install-determinate).\n\nDeterminate 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):\n\n| Platform                                                             |    Multi user?    | `root` only |     Maturity      |\n| -------------------------------------------------------------------- | :---------------: | :---------: | :---------------: |\n| Linux (`x86_64` and `aarch64`)                                       | ✓ (via [systemd]) |      ✓      |      Stable       |\n| MacOS (`x86_64` and `aarch64`)                                       |         ✓         |             | Stable (see note) |\n| [Valve Steam Deck][steam-deck] (SteamOS)                             |         ✓         |             |      Stable       |\n| [Windows Subsystem for Linux][wsl] 2 (WSL2) (`x86_64` and `aarch64`) | ✓ (via [systemd]) |      ✓      |      Stable       |\n| [Podman] Linux containers                                            | ✓ (via [systemd]) |      ✓      |      Stable       |\n| [Docker] containers                                                  |                   |      ✓      |      Stable       |\n\n## Install Nix\n\nYou can install Nix with the default [planner](#planners) and options by running this script:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  sh -s -- install\n```\n\nTo download a platform-specific installer binary yourself:\n\n```shell\ncurl -sL -o nix-installer https://artifacts.nixos.org/experimental-installer/nix-installer-x86_64-linux\nchmod +x nix-installer\n./nix-installer\n```\n\nThis would install Nix on an `x86_64-linux` system but you can replace that with the system of your choice.\n\n### Install Determinate\n\nIf 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:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  sh -s -- install --determinate\n```\n\n\u003e [!TIP]\n\u003e If you use [nix-darwin] or [NixOS], we recommend installing Determinate using modules provided by the [`determinate` flake][determinate-flake].\n\nDeterminate is:\n\n- [**Determinate Nix**][det-nix], [Determinate Systems][detsys]' validated and secure downstream Nix distribution for enterprises.\n- [**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].\n\n### Planners\n\nDeterminate Nix Installer installs Nix by following a _plan_ made by a _planner_.\nTo review the available planners:\n\n```shell\n/nix/nix-installer install --help\n```\n\nPlanners have their own options and defaults, sharing most of them in common.\nTo see the options for Linux, for example:\n\n```shell\n/nix/nix-installer install linux --help\n```\n\nYou can configure planners using environment variables or command arguments:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  NIX_BUILD_GROUP_NAME=nixbuilder sh -s -- install --nix-build-group-id 4000\n\n# Alternatively:\n\nNIX_BUILD_GROUP_NAME=nixbuilder ./nix-installer install --nix-build-group-id 4000\n```\n\nSee [Installer settings](#installer-settings) below for a full list of options.\n\n### Troubleshooting\n\nHaving problems with the installer?\nConsult our [troubleshooting guide](./docs/troubleshooting.md) to see if your problem is covered.\n\n### Upgrading Nix\n\nYou can upgrade Nix to [our currently recommended version of Nix][recommended-nix] by running:\n\n```shell\nsudo -i nix upgrade-nix\n```\n\nAlternatively, you can [uninstall](#uninstalling) and [reinstall](#install-nix) with a different version of Determinate Nix Installer.\n\n### Uninstalling\n\nYou can remove Nix installed by Determinate Nix Installer by running:\n\n```shell\n/nix/nix-installer uninstall\n```\n\n### As a Github Action\n\nYou can install Nix on [GitHub Actions][actions] using [`nix-installer-action`][nix-installer-action].\nHere's an example configuration:\n\n```yaml\non:\n  pull_request:\n  push:\n    branches: [main]\n\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-22.04\n    steps:\n      - uses: actions/checkout@v4\n      - name: Install Nix\n        uses: DeterminateSystems/nix-installer-action@main\n      - name: Run `nix build`\n        run: nix build .\n```\n\n### On GitLab\n\n[GitLab CI][gitlab-ci] runners are typically [Docker] based and run as the `root` user.\nThis means that `systemd` is not present, so you need to pass the `--init none` option to the Linux planner.\n\nOn the default [GitLab] runners, you can install Nix using this configuration:\n\n```yaml\ntest:\n  script:\n    - curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | sh -s -- install linux --no-confirm --init none\n    - . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh\n    - nix run nixpkgs#hello\n    - nix profile install nixpkgs#hello\n    - hello\n```\n\nIf you are using different runners, the above example may need to be adjusted.\n\n### Without systemd (Linux only)\n\n\u003e [!WARNING]\n\u003e When `--init none` is used, _only_ `root` or users who can elevate to `root` privileges can run Nix:\n\u003e\n\u003e ```shell\n\u003e sudo -i nix run nixpkgs#hello\n\u003e ```\n\nIf you don't use [systemd], you can still install Nix by explicitly specifying the `linux` plan and `--init none`:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  sh -s -- install linux --init none\n```\n\n### In a container\n\nIn [Docker]/[Podman] containers or [WSL2][wsl] instances where an init (like `systemd`) is not present, pass `--init none`.\n\nFor containers (without an init):\n\n\u003e [!WARNING]\n\u003e When `--init none` is used, _only_ `root` or users who can elevate to `root` privileges can run Nix:\n\u003e\n\u003e ```shell\n\u003e sudo -i nix run nixpkgs#hello\n\u003e ```\n\n```dockerfile\n# Dockerfile\nFROM ubuntu:latest\nRUN apt update -y\nRUN apt install curl -y\nRUN curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | sh -s -- install linux \\\n  --extra-conf \"sandbox = false\" \\\n  --init none \\\n  --no-confirm\nENV PATH=\"${PATH}:/nix/var/nix/profiles/default/bin\"\nRUN nix run nixpkgs#hello\n```\n\n```shell\ndocker build -t ubuntu-with-nix .\ndocker run --rm -ti ubuntu-with-nix\ndocker rmi ubuntu-with-nix\n# or\npodman build -t ubuntu-with-nix .\npodman run --rm -ti ubuntu-with-nix\npodman rmi ubuntu-with-nix\n```\n\nFor containers with a [systemd] init:\n\n```dockerfile\n# Dockerfile\nFROM ubuntu:latest\nRUN apt update -y\nRUN apt install curl systemd -y\nRUN curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | sh -s -- install linux \\\n  --extra-conf \"sandbox = false\" \\\n  --no-start-daemon \\\n  --no-confirm\nENV PATH=\"${PATH}:/nix/var/nix/profiles/default/bin\"\nRUN nix run nixpkgs#hello\nCMD [ \"/bin/systemd\" ]\n```\n\n```shell\npodman build -t ubuntu-systemd-with-nix .\nIMAGE=$(podman create ubuntu-systemd-with-nix)\nCONTAINER=$(podman start $IMAGE)\npodman exec -ti $CONTAINER /bin/bash\npodman rm -f $CONTAINER\npodman rmi $IMAGE\n```\n\nWith some container tools, such as [Docker], you can omit `sandbox = false`.\nOmitting this will negatively impact compatibility with container tools like [Podman].\n\n### In WSL2\n\nWe **strongly recommend** first [enabling systemd][enabling-systemd] and then installing Nix as normal:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  sh -s -- install\n```\n\nIf [WSLg][wslg] is enabled, you can do things like open a Linux Firefox from Windows on Powershell:\n\n```powershell\nwsl nix run nixpkgs#firefox\n```\n\nTo use some OpenGL applications, you can use [`nixGL`][nixgl] (note that some applications, such as `blender`, may not work):\n\n```powershell\nwsl nix run --impure github:guibou/nixGL nix run nixpkgs#obs-studio\n```\n\nIf enabling systemd is not an option, pass `--init none` at the end of the command:\n\n\u003e [!WARNING]\n\u003e When `--init none` is used, _only_ `root` or users who can elevate to `root` privileges can run Nix:\n\u003e\n\u003e ```shell\n\u003e sudo -i nix run nixpkgs#hello\n\u003e ```\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  sh -s -- install linux --init none\n```\n\n### Skip confirmation\n\nIf you'd like to bypass the confirmation step, you can apply the `--no-confirm` flag:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \\\n  sh -s -- install --no-confirm\n```\n\nThis is especially useful when using the installer in non-interactive scripts.\n\n## Features\n\nExisting Nix installation scripts do a good job but they are difficult to maintain.\n\nSubtle differences in the shell implementations and tool used in the scripts make it difficult to make meaningful changes to the installer.\n\nDeterminate Nix installer has numerous advantages over these options:\n\n- It installs Nix with [flakes] enabled by default\n- It enables Nix to survive macOS upgrades\n- It keeps an installation _receipt_ for easy [uninstallation](#uninstalling)\n- It uses [planners](#planners) to create appropriate install plans for complicated targets\u0026mdash;plans that you can review prior to installation\n- It enables you to perform a best-effort reversion in the facing of a failed install\n- It improves installation performance by maximizing parallel operations\n- It supports an expanded test suite including \"curing\" cases (compatibility with Nix already on the system)\n- It supports SELinux and OSTree-based distributions without asking users to make compromises\n- It operates as a single, static binary with external dependencies such as [OpenSSL], only calling existing system tools (like `useradd`) when necessary\n- As a macOS remote build target, it ensures that Nix is present on the `PATH`\n\n## Nix community involvement\n\nIt has been wonderful to collaborate with other participants in the [Nix Installer Working Group][wg] and members of the broader community.\nThe working group maintains a [foundation-owned fork of the installer][forked-installer].\n\n## Quirks\n\nWhile Determinate Nix Installer tries to provide a comprehensive and unquirky experience, there are unfortunately some issues that may require manual intervention or operator choices.\n\n### Using MacOS after removing Nix while nix-darwin was still installed, network requests fail\n\nIf Nix was previously uninstalled without uninstalling [nix-darwin] first, you may experience errors similar to this:\n\n```shell\nnix shell nixpkgs#curl\n\nerror: unable to download 'https://cache.nixos.org/g8bqlgmpa4yg601w561qy2n576i6g0vh.narinfo': Problem with the SSL CA cert (path? access rights?) (77)\n```\n\nThis occurs because `nix-darwin` provisions an `org.nixos.activate-system` service which remains after Nix is uninstalled.\nThe `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.\n\n```shell\nls -lah /etc/ssl/certs\n\ntotal 0\ndrwxr-xr-x  3 root  wheel    96B Oct 17 08:26 .\ndrwxr-xr-x  6 root  wheel   192B Sep 16 06:28 ..\nlrwxr-xr-x  1 root  wheel    41B Oct 17 08:26 ca-certificates.crt -\u003e /etc/static/ssl/certs/ca-certificates.crt\n```\n\nThe problem is compounded by the matter that the [`nix-darwin` uninstaller](https://github.com/LnL7/nix-darwin#uninstalling) will not work after uninstalling Nix, since it uses Nix and requires network connectivity.\n\nIt's possible to resolve this situation by removing the `org.nixos.activate-system` service and the `ca-certificates`:\n\n```shell\nsudo rm /Library/LaunchDaemons/org.nixos.activate-system.plist\nsudo launchctl bootout system/org.nixos.activate-system\n/nix/nix-installer uninstall\nsudo rm /etc/ssl/certs/ca-certificates.crt\n```\n\nRun the installer again and it should work.\n\nUp-to-date versions of the installer will refuse to uninstall until [nix-darwin] is uninstalled first, helping to mitigate this problem.\n\n## Building a binary\n\nSince you'll be using the installer to install Nix on systems without Nix, the default build is a static binary.\n\nTo build a portable Linux binary on a system with Nix:\n\n```shell\n# to build a local copy\nnix build -L \".#nix-installer-static\"\n# to build the remote main development branch\nnix build -L \"github:NixOS/experimental-nix-installer#nix-installer-static\"\n# for a specific version of the installer:\nexport NIX_INSTALLER_TAG=\"v0.6.0\"\nnix build -L \"github:NixOS/experimental-nix-installer/$NIX_INSTALLER_TAG#nix-installer-static\"\n```\n\nOn macOS:\n\n```shell\n# to build a local copy\nnix build -L \".#nix-installer\"\n# to build the remote main development branch\nnix build -L \"github:NixOS/experimental-nix-installer#nix-installer\"\n# for a specific version of the installer:\nexport NIX_INSTALLER_TAG=\"v0.6.0\"\nnix build -L \"github:NixOS/experimental-nix-installer/$NIX_INSTALLER_TAG#nix-installer\"\n```\n\nThen copy `result/bin/nix-installer` to the machine you wish to run it on.\nYou can also add the installer to a system without Nix using [cargo], as there are no system dependencies to worry about:\n\n```shell\n# to build and run a local copy\nRUSTFLAGS=\"--cfg tokio_unstable\" cargo run -- --help\n# to build the remote main development branch\nRUSTFLAGS=\"--cfg tokio_unstable\" cargo install --git https://github.com/DeterminateSystems/nix-installer\nnix-installer --help\n# for a specific version of the installer:\nexport NIX_INSTALLER_TAG=\"v0.6.0\"\nRUSTFLAGS=\"--cfg tokio_unstable\" cargo install --git https://github.com/DeterminateSystems/nix-installer --tag $NIX_INSTALLER_TAG\nnix-installer --help\n```\n\nTo make this build portable, pass the `--target x86_64-unknown-linux-musl` option.\n\n\u003e [!NOTE]\n\u003e 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.\n\n## As a Rust library\n\n\u003e [!WARNING]\n\u003e Using Determinate Nix Installer as a [Rust] library is still experimental.\n\u003e This feature is likely to be removed in the future without an advocate.\n\u003e If you're using this, please let us know and we can provide a path to stabilization.\n\nAdd the [`nix-installer` library][lib] to your dependencies:\n\n```shell\ncargo add nix-installer\n```\n\nIf you're building a CLI, check out the `cli` feature flag for [`clap`][clap] integration.\n\nYou'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:\n\n```toml\n# .cargo/config.toml\n[build]\nrustflags=[\"--cfg\", \"tokio_unstable\"]\n```\n\nYou'll also need to set the `NIX_INSTALLER_TARBALL_PATH` environment variable to point to a target-appropriate Nix installation tarball, like nix-2.21.2-aarch64-darwin.tar.xz.\nThe contents are embedded in the resulting binary instead of downloaded at installation time.\n\nThen it's possible to review the [documentation](https://docs.rs/nix-installer/latest/nix_installer/):\n\n```shell\ncargo doc --open -p nix-installer\n```\n\nDocumentation is also available via `nix build`:\n\n```shell\nnix build github:NixOS/experimental-nix-installer#nix-installer.doc\nfirefox result-doc/nix-installer/index.html\n```\n\n## Accessing other versions\n\nYou can pin to a specific version of Determinate Nix Installer by modifying the download URL.\nHere's an example:\n\n```shell\nVERSION=\"v0.6.0\"\ncurl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer/tag/${VERSION}/nix-installer.sh | \\\n  sh -s -- install\n```\n\nTo discover which versions are available, or download the binaries for any release, check the [Github Releases][releases].\n\nYou can download and use these releases directly.\nHere's an example:\n\n```shell\nVERSION=\"v0.6.0\"\nARCH=\"aarch64-linux\"\ncurl -sSf -L https://github.com/NixOS/experimental-nix-installer/releases/download/${VERSION}/nix-installer-${ARCH} -o nix-installer\n./nix-installer install\n```\n\nEach installer version has an [associated supported nix version](src/settings.rs)\u0026mdash;if you pin the installer version, you'll also indirectly pin to the associated nix version.\n\nYou 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.\nHere are some example Nix package URLs, including the Nix version, OS, and architecture:\n\n- https://releases.nixos.org/nix/nix-2.18.1/nix-2.18.1-x86_64-linux.tar.xz\n- https://releases.nixos.org/nix/nix-2.18.1/nix-2.18.1-aarch64-darwin.tar.xz\n\n## Installation differences\n\nDiffering from the upstream [Nix][upstream-nix] installer scripts:\n\n* an installation receipt (for uninstalling) is stored at `/nix/receipt.json` as well as a copy of the install binary at `/nix/nix-installer`\n* `ssl-cert-file` is set in `/etc/nix/nix.conf` if the `ssl-cert-file` argument is used.\n\n## Installer settings\n\nDeterminate Nix Installer provides a variety of configuration settings, some [general](#general-settings) and some on a per-command basis.\nAll settings are available via flags or via `NIX_INSTALLER_*` environment variables.\n\n### General settings\n\nThese settings are available for all commands.\n\n| Flag(s)            | Description                                                               | Default (if any) | Environment variable           |\n| ------------------ | ------------------------------------------------------------------------- | ---------------- | ------------------------------ |\n| `--log-directives` | Tracing directives delimited by comma                                     |                  | `NIX_INSTALLER_LOG_DIRECTIVES` |\n| `--logger`         | Which logger to use (options are `compact`, `full`, `pretty`, and `json`) | `compact`        | `NIX_INSTALLER_LOGGER`         |\n| `--verbose`        | Enable debug logs, (`-vv` for trace)                                      | `false`          | `NIX_INSTALLER_VERBOSITY`      |\n\n### Installation (`nix-installer install`)\n\n| Flag(s)                    | Description                                                                                        | Default (if any)                                     | Environment variable                   |\n| -------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------- |\n| `--determinate`            | Installs [Determinate]                                                                             | `NIX_INSTALLER_DETERMINATE`                          |\n| `--diagnostic-attribution` | Relate the install diagnostic to a specific value                                                  |                                                      | `NIX_INSTALLER_DIAGNOSTIC_ATTRIBUTION` |\n| `--diagnostic-endpoint`    | The URL or file path for an installation diagnostic to be sent                                     | `https://install.determinate.systems/nix/diagnostic` | `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT`    |\n| `--explain`                | Provide an explanation of the changes the installation process will make to your system            | `false`                                              | `NIX_INSTALLER_EXPLAIN`                |\n| `--extra-conf`             | Extra configuration lines for `/etc/nix.conf`                                                      |                                                      | `NIX_INSTALLER_EXTRA_CONF`             |\n| `--force`                  | Whether the installer should forcibly recreate files it finds existing                             | `false`                                              | `NIX_INSTALLER_FORCE`                  |\n| `--init`                   | Which init system to configure (if `--init none` Nix will be root-only)                            | `launchd` (macOS), `systemd` (Linux)                 | `NIX_INSTALLER_INIT`                   |\n| `--nix-build-group-id`     | The Nix build group GID                                                                            | `350` (macOS), `30000` (Linux)                       | `NIX_INSTALLER_NIX_BUILD_GROUP_ID`     |\n| `--nix-build-group-name`   | The Nix build group name                                                                           | `nixbld`                                             | `NIX_INSTALLER_NIX_BUILD_GROUP_NAME`   |\n| `--nix-build-user-count`   | The number of build users to create                                                                | `32`                                                 | `NIX_INSTALLER_NIX_BUILD_USER_COUNT`   |\n| `--nix-build-user-id-base` | The Nix build user base UID (ascending) (NOTE: the first UID will be this base + 1)                | `350` (macOS), `30000` (Linux)                       | `NIX_INSTALLER_NIX_BUILD_USER_ID_BASE` |\n| `--nix-build-user-prefix`  | The Nix build user prefix (user numbers will be postfixed)                                         | `_nixbld` (macOS), `nixbld` (Linux)                  | `NIX_INSTALLER_NIX_BUILD_USER_PREFIX`  |\n| `--nix-package-url`        | The Nix package URL                                                                                |                                                      | `NIX_INSTALLER_NIX_PACKAGE_URL`        |\n| `--no-confirm`             | Run installation without requiring explicit user confirmation                                      | `false`                                              | `NIX_INSTALLER_NO_CONFIRM`             |\n| `--no-modify-profile`      | Modify the user profile to automatically load Nix.                                                 | `true`                                               | `NIX_INSTALLER_MODIFY_PROFILE`         |\n| `--proxy`                  | The proxy to use (if any); valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL` |                                                      | `NIX_INSTALLER_PROXY`                  |\n| `--ssl-cert-file`          | An SSL cert to use (if any); used for fetching Nix and sets `ssl-cert-file` in `/etc/nix/nix.conf` |                                                      | `NIX_INSTALLER_SSL_CERT_FILE`          |\n| `--no-start-daemon`        | Start the daemon (if not `--init none`)                                                            | `true`                                               | `NIX_INSTALLER_START_DAEMON`           |\n\nYou can also specify a planner with the first argument:\n\n```shell\nnix-installer install \u003cplan\u003e\n```\n\nAlternatively, you can use the `NIX_INSTALLER_PLAN` environment variable:\n\n```shell\nNIX_INSTALLER_PLAN=\u003cplan\u003e nix-installer install\n```\n\n### Uninstalling (`nix-installer uninstall`)\n\n| Flag(s)        | Description                                                                             | Default (if any) | Environment variable       |\n| -------------- | --------------------------------------------------------------------------------------- | ---------------- | -------------------------- |\n| `--explain`    | Provide an explanation of the changes the installation process will make to your system | `false`          | `NIX_INSTALLER_EXPLAIN`    |\n| `--no-confirm` | Run installation without requiring explicit user confirmation                           | `false`          | `NIX_INSTALLER_NO_CONFIRM` |\n\nYou can also specify an installation receipt as the first argument (the default is `/nix/receipt.json`):\n\n```shell\nnix-installer uninstall /path/to/receipt.json\n```\n\n### Planning (`nix-installer plan`)\n\n| Flag(s)      | Description                                        | Default (if any) | Environment variable          |\n| ------------ | -------------------------------------------------- | ---------------- | ----------------------------- |\n| `--out-file` | Where to write the generated plan (in JSON format) | `/dev/stdout`    | `NIX_INSTALLER_PLAN_OUT_FILE` |\n\n### Repairing (`nix-installer repair`)\n\n| Flag(s)        | Description                                                   | Default (if any) | Environment variable       |\n| -------------- | ------------------------------------------------------------- | ---------------- | -------------------------- |\n| `--no-confirm` | Run installation without requiring explicit user confirmation | `false`          | `NIX_INSTALLER_NO_CONFIRM` |\n\n### Self-test (`nix-installer self-test`)\n\n`nix-installer self-test` only takes [general settings](#general-settings).\n\n## Diagnostics\n\nBy default, this fork of the Determinate Nix Installer does not compile support for diagnostics.\n\n[actions]: https://github.com/features/actions\n[cache]: https://docs.determinate.systems/flakehub/cache\n[cargo]: https://doc.rust-lang.org/cargo\n[clap]: https://clap.rs\n[det-nix]: https://docs.determinate.systems/determinate-nix\n[determinate]: https://docs.determinate.systems\n[determinate-flake]: https://github.com/DeterminateSystems/determinate\n[detsys]: https://determinate.systems\n[docker]: https://docker.com\n[diagnosticdata]: https://github.com/DeterminateSystems/nix-installer/blob/f9f927840d532b71f41670382a30cfcbea2d8a35/src/diagnostics.rs#L29-L43\n[enabling-systemd]: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#how-can-you-get-systemd-on-your-machine\n[flakehub]: https://flakehub.com\n[flakes]: https://zero-to-nix.com/concepts/flakes\n[forked-installer]: https://github.com/nixos/experimental-nix-installer\n[gitlab]: https://gitlab.com\n[gitlab-ci]: https://docs.gitlab.com/ee/ci\n[lib]: https://docs.rs/nix-installer\n[macos-upgrades]: https://determinate.systems/posts/nix-survival-mode-on-macos/\n[nix]: https://nixos.org\n[nix-darwin]: https://github.com/LnL7/nix-darwin\n[nix-installer-action]: https://github.com/DeterminateSystems/nix-installer-action\n[nixgl]: https://github.com/guibou/nixGL\n[nixos]: https://zero-to-nix.com/concepts/nixos\n[openssl]: https://openssl.org\n[podman]: https://podman.io\n[privacy]: https://determinate.systems/policies/privacy\n[private-flakes]: https://docs.determinate.systems/flakehub/private-flakes\n[process-groups]: https://docs.rs/tokio/1.24.1/tokio/process/struct.Command.html#method.process_group\n[recommended-nix]: https://github.com/DeterminateSystems/nix/releases/latest\n[releases]: https://github.com/NixOS/experimental-nix-installer/releases\n[rust]: https://rust-lang.org\n[selinux]: https://selinuxproject.org\n[semver]: https://docs.determinate.systems/flakehub/concepts/semver\n[steam-deck]: https://store.steampowered.com/steamdeck\n[systemd]: https://systemd.io\n[upstream-nix]: https://github.com/NixOS/nix\n[wg]: https://discourse.nixos.org/t/nix-installer-workgroup/21495\n[wsl]: https://learn.microsoft.com/en-us/windows/wsl/about\n[wslg]: https://github.com/microsoft/wslg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixos%2Fexperimental-nix-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixos%2Fexperimental-nix-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixos%2Fexperimental-nix-installer/lists"}