{"id":13631859,"url":"https://github.com/DeterminateSystems/nix-installer","last_synced_at":"2025-04-17T22:32:10.041Z","repository":{"id":62423638,"uuid":"532049613","full_name":"DeterminateSystems/nix-installer","owner":"DeterminateSystems","description":"Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 7 million installs.","archived":false,"fork":false,"pushed_at":"2024-11-08T20:01:14.000Z","size":2268,"stargazers_count":2222,"open_issues_count":241,"forks_count":57,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-11-08T20:19:06.587Z","etag":null,"topics":["docker","fedora","installer","linux","macos","nix","ostree","podman","selinux","silverblue","wsl","wsl2"],"latest_commit_sha":null,"homepage":"https://determinate.systems","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeterminateSystems.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-02T19:10:48.000Z","updated_at":"2024-11-08T19:51:59.000Z","dependencies_parsed_at":"2023-12-21T20:20:17.035Z","dependency_job_id":"3b135ff3-c0a8-4672-8828-28a57404184b","html_url":"https://github.com/DeterminateSystems/nix-installer","commit_stats":{"total_commits":583,"total_committers":20,"mean_commits":29.15,"dds":0.3241852487135506,"last_synced_commit":"5f1489f8b34d2fd87bf15e1f7d6614bc9374dc2d"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeterminateSystems","download_url":"https://codeload.github.com/DeterminateSystems/nix-installer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223747712,"owners_count":17195932,"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":["docker","fedora","installer","linux","macos","nix","ostree","podman","selinux","silverblue","wsl","wsl2"],"created_at":"2024-08-01T22:02:41.340Z","updated_at":"2025-04-17T22:32:10.031Z","avatar_url":"https://github.com/DeterminateSystems.png","language":"Rust","readme":"# Determinate Nix Installer\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 either [Nix](https://nixos.org) or [Determinate Nix](https://docs.determinate.systems/determinate-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://install.determinate.systems/nix | \\\n  sh -s -- install\n```\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## Installation\n\nYou can install with the default [planner](#planners) and options by running this script:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \\\n  sh -s -- install\n```\n\nThis prompts you if you want [Determinate Nix](https://docs.determinate.systems/determinate-nix) or the Nix from [nixos.org](https://nixos.org/download).\nIf you would like to skip the prompt and install Determinate Nix directly, you can pass `--determinate` directly:\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \\\n  sh -s -- install --determinate\n```\n\n\u003e [!TIP]\n\u003e If you use [NixOS], we recommend installing Determinate using modules provided by the [`determinate` flake][determinate-flake].\n\nTo download a platform-specific installer binary yourself:\n\n```shell\ncurl -sL -o nix-installer https://install.determinate.systems/nix/nix-installer-x86_64-linux\nchmod +x nix-installer\n./nix-installer\n```\n\nThis installs Nix or Determinate Nix on an `x86_64-linux` system but you can replace that with the system of your choice.\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://install.determinate.systems/nix | \\\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://install.determinate.systems/nix | 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://install.determinate.systems/nix | \\\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\u003e [!WARNING]\n\u003e If you want to add a `flake.nix`, first declare a working directory (such as `/src`) in your `Dockerfile`.\n\u003e You cannot lock a flake placed at the docker image root (`/`) ([see details](https://github.com/DeterminateSystems/nix-installer/issues/1066)).\n\u003e You would get a `file '/dev/full' has an unsupported type` during the docker build.\n\u003e\n\u003e ```dockerfile\n\u003e # append this to the below dockerfiles\n\u003e WORKDIR /src\n\u003e # now flakes will work\n\u003e RUN nix flake init\n\u003e RUN nix flake lock\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://install.determinate.systems/nix | 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://install.determinate.systems/nix | 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://install.determinate.systems/nix | \\\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://install.determinate.systems/nix | \\\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://install.determinate.systems/nix | \\\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][survival-mode]\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.\nSee [this document](./docs/quirks.md) for information on resolving these issues:\n\n- [Using MacOS after removing Nix while nix-darwin was still installed, network requests fail](./docs/quirks.md#using-macos-after-removing-nix-while-nix-darwin-was-still-installed-network-requests-fail)\n\n## Building a binary\n\nSee [this guide](./docs/building.md) for instructions on building and distributing the installer yourself.\n\n## As a Rust library\n\nThe Determinate Nix Installer is available as a standard [Rust] library.\nSee [this guide](./docs/rust-library.md) for instructions on using the library in your own Rust code.\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://install.determinate.systems/nix/tag/${VERSION} | \\\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/DeterminateSystems/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- In `nix.conf`:\n  - the `nix-command` and `flakes` features are enabled\n  - `bash-prompt-prefix` is set\n  - `auto-optimise-store` is set to `true` (On Linux only)\n  * `always-allow-substitutes` is set to `true`\n  * `extra-nix-path` is set to `nixpkgs=flake:nixpkgs`\n  * `max-jobs` is set to `auto`\n  * `upgrade-nix-store-path-url` is set to `https://install.determinate.systems/nix-upgrade/stable/universal`, to prevent unintentional downgrades.\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- `nix-channel --update` is not run, `~/.nix-channels` is not provisioned\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 distinct user ID                                       |                                      | `NIX_INSTALLER_DIAGNOSTIC_ATTRIBUTION` |\n| `--diagnostic-endpoint`    | The URL or file path for an installation diagnostic to be sent                                     |                                      | `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\nThe goal of Determinate Nix Installer is to successfully and correctly install Nix.\nThe `curl | sh` pipeline and the installer collects a little bit of anonymous diagnostic information to help us make that true.\n\nThe anonymous diagnostics we collect to help us improve the installer includes:\n\n- The installer version\n- Which planner is used (`linux`, `macos`, `steam-deck`)\n- What action was taken (install, uninstall)\n- The result (`Success`, `Failure`, `Pending`, or `Cancelled`)\n- The customized planner setting names (_not_ the values)\n- Information about your host, like the OS and version, architecture, binary format, etc.\n- Whether you're in CI or not\n- A high level description of what the failure was, like if a specific command failed.\n\nTo disable diagnostic reporting, set the diagnostics URL to an empty string by passing `--diagnostic-endpoint=\"\"` or setting `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT=\"\"`.\n\nYou can read the full privacy policy for [Determinate Systems][detsys], the creators of Determinate Nix Installer, [here][privacy].\n\n[actions]: https://github.com/features/actions\n[cache]: https://docs.determinate.systems/flakehub/cache\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[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[macos-upgrades]: https://determinate.systems/posts/nix-survival-mode-on-macos/\n[nix]: https://nixos.org\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[recommended-nix]: https://github.com/DeterminateSystems/nix/releases/latest\n[releases]: https://github.com/DeterminateSystems/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[survival-mode]: https://determinate.systems/posts/nix-survival-mode-on-macos\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","funding_links":[],"categories":["Rust","计算机编程_数据结构与算法","wsl","Installation Media"],"sub_categories":["资源传输下载","Discovery"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeterminateSystems%2Fnix-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDeterminateSystems%2Fnix-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeterminateSystems%2Fnix-installer/lists"}