{"id":15282025,"url":"https://github.com/determinatesystems/nix-installer-action","last_synced_at":"2025-04-08T19:24:26.052Z","repository":{"id":91931180,"uuid":"588678074","full_name":"DeterminateSystems/nix-installer-action","owner":"DeterminateSystems","description":"The Github Action for the Determinate Nix Installer","archived":false,"fork":false,"pushed_at":"2024-10-04T17:01:51.000Z","size":7496,"stargazers_count":165,"open_issues_count":15,"forks_count":16,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T19:59:45.047Z","etag":null,"topics":["actions","flakes","install","nix"],"latest_commit_sha":null,"homepage":"https://github.com/determinateSystems/nix-installer","language":"TypeScript","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":null,"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":"2023-01-13T18:03:12.000Z","updated_at":"2024-10-18T14:15:35.000Z","dependencies_parsed_at":"2023-10-13T04:27:23.827Z","dependency_job_id":"6fc79f35-32a2-4889-89b7-7b8f04dad80b","html_url":"https://github.com/DeterminateSystems/nix-installer-action","commit_stats":{"total_commits":202,"total_committers":14,"mean_commits":"14.428571428571429","dds":0.6534653465346535,"last_synced_commit":"b92f66560d6f97d6576405a7bae901ab57e72b6a"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fnix-installer-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeterminateSystems","download_url":"https://codeload.github.com/DeterminateSystems/nix-installer-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247909892,"owners_count":21016597,"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":["actions","flakes","install","nix"],"created_at":"2024-09-30T14:05:19.287Z","updated_at":"2025-04-08T19:24:26.016Z","avatar_url":"https://github.com/DeterminateSystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Determinate Nix Installer Action\n\nBased on the [Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer), responsible for over tens of thousands of Nix installs daily.\nThe fast, friendly, and reliable GitHub Action to install Nix with Flakes.\n\n## Supports\n\n- ✅ **Accelerated KVM** on open source projects and larger runners. See [GitHub's announcement](https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/) for more info.\n- ✅ Linux, x86_64, aarch64, and i686\n- ✅ macOS, x86_64 and aarch64\n- ✅ WSL2, x86_64 and aarch64\n- ✅ Containers\n- ✅ Valve's SteamOS\n- ✅ GitHub Enterprise Server\n- ✅ GitHub Hosted, self-hosted, and long running Actions Runners\n\n## Usage\n\n```yaml\non:\n  pull_request:\n  push:\n    branches: [main]\n\njobs:\n  lints:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: DeterminateSystems/nix-installer-action@main\n      - run: nix build .\n```\n\n### With FlakeHub\n\nTo fetch private flakes from FlakeHub and Nix builds from FlakeHub Cache, update the `permissions` block and pass `determinate: true`:\n\n```yaml\non:\n  pull_request:\n  push:\n    branches: [main]\n\njobs:\n  lints:\n    name: Build\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: \"write\"\n      contents: \"read\"\n    steps:\n      - uses: actions/checkout@v4\n      - uses: DeterminateSystems/nix-installer-action@main\n        with:\n          determinate: true\n      - run: nix build .\n```\n\nSee [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for a full example.\n\n### Advanced Usage\n\n- If KVM is available, the installer sets up KVM so that Nix can use it ,and exports the `DETERMINATE_NIX_KVM` environment variable set to 1.\n  If KVM is not available, `DETERMINATE_NIX_KVM` is set to 0.\n  This can be used in combination with GitHub Actions' `if` syntax for turning on and off steps.\n\n## Installation Differences\n\nDiffering from the upstream [Nix](https://github.com/NixOS/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  * `extra-nix-path` is set to `nixpkgs=flake:nixpkgs`\n  * `max-jobs` is set to `auto`\n- KVM is enabled by default.\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## Configuration\n\n| Parameter               | Description                                                                                                                                                                                                                                                                    | Type                                       | Default                                                        |\n| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------- | :------------------------------------------------------------- |\n| `backtrace`             | The setting for [`RUST_BACKTRACE`][backtrace]                                                                                                                                                                                                                                  | string                                     |                                                                |\n| `determinate`           | Whether to install [Determinate Nix](https://determinate.systems/enterprise) and log in to FlakeHub for private Flakes and binary caches.                                                                                                                                      | Boolean                                    | `false`                                                        |\n| `extra-args`            | Extra arguments to pass to the planner (prefer using structured `with:` arguments unless using a custom [planner]!)                                                                                                                                                            | string                                     |                                                                |\n| `extra-conf`            | Extra configuration lines for `/etc/nix/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set)                                                                                                                                | string                                     |                                                                |\n| `flakehub`              | Deprecated. Implies `determinate`.                                                                                                                                                                                                                                             | Boolean                                    | `false`                                                        |\n| `force-docker-shim`     | Force the use of Docker as a process supervisor. This setting is automatically enabled when necessary.                                                                                                                                                                         | Boolean                                    | `false`                                                        |\n| `github-token`          | A [GitHub token] for making authenticated requests (which have a higher rate-limit quota than unauthenticated requests)                                                                                                                                                        | string                                     | `${{ github.token }}`                                          |\n| `github-server-url`     | The URL for the GitHub server, to use with the `github-token` token. Defaults to the current GitHub server, supporting GitHub Enterprise Server automatically. Only change this value if the provided `github-token` is for a different GitHub server than the current server. | string                                     | `${{ github.server }}`                                         |\n| `init`                  | The init system to configure (requires `planner: linux-multi`)                                                                                                                                                                                                                 | enum (`none` or `systemd`)                 |                                                                |\n| `kvm`                   | Automatically configure the GitHub Actions Runner for NixOS test support, if the host supports it.                                                                                                                                                                             | Boolean                                    | `true`                                                         |\n| `local-root`            | A local `nix-installer` binary root. Overrides the `nix-installer-url` setting (a `nix-installer.sh` should exist, binaries should be named `nix-installer-$ARCH`, eg. `nix-installer-x86_64-linux`).                                                                          | Boolean                                    | `false`                                                        |\n| `log-directives`        | A list of [tracing directives], comma separated with `-`s replaced with `_` (eg. `nix_installer=trace`)                                                                                                                                                                        | string                                     |                                                                |\n| `logger`                | The logger to use during installation                                                                                                                                                                                                                                          | enum (`pretty`, `json`, `full`, `compact`) |                                                                |\n| `mac-case-sensitive`    | Use a case-sensitive volume (`planner: macos` only)                                                                                                                                                                                                                            | Boolean                                    | `false`                                                        |\n| `mac-encrypt`           | Force encryption on the volume (`planner: macos` only)                                                                                                                                                                                                                         | Boolean                                    | `false`                                                        |\n| `mac-root-disk`         | The root disk of the target (`planner: macos` only)                                                                                                                                                                                                                            | string                                     |                                                                |\n| `mac-volume-label`      | The label for the created [APFS] volume (`planner: macos` only)                                                                                                                                                                                                                | string                                     |                                                                |\n| `modify-profile`        | Modify the user [profile] to automatically load Nix                                                                                                                                                                                                                            | Boolean                                    | `false`                                                        |\n| `nix-build-group-id`    | The Nix build group GID                                                                                                                                                                                                                                                        | integer                                    |                                                                |\n| `nix-build-group-name`  | The Nix build group name                                                                                                                                                                                                                                                       | string                                     |                                                                |\n| `nix-build-user-base`   | The Nix build user base UID (ascending)                                                                                                                                                                                                                                        | integer                                    |                                                                |\n| `nix-build-user-count`  | The number of build users to create                                                                                                                                                                                                                                            | integer                                    | 32                                                             |\n| `nix-build-user-prefix` | The Nix build user prefix (user numbers will be postfixed)                                                                                                                                                                                                                     | string                                     |                                                                |\n| `source-branch`         | The branch of `nix-installer` to use (conflicts with the `source-tag`, `source-revision`, and `source-branch`)                                                                                                                                                                 | string                                     |                                                                |\n| `source-pr`             | The pull request of `nix-installer` to use (conflicts with `source-tag`, `source-revision`, and `source-branch`)                                                                                                                                                               | integer                                    |                                                                |\n| `source-revision`       | The revision of `nix-installer` to use (conflicts with `source-tag`, `source-branch`, and `source-pr`)                                                                                                                                                                         | string                                     |                                                                |\n| `source-tag`            | The tag of `nix-installer` to use (conflicts with `source-revision`, `source-branch`, `source-pr`)                                                                                                                                                                             | string                                     |                                                                |\n| `source-url`            | A URL pointing to the `nix-installer` binary                                                                                                                                                                                                                                   | URL                                        | n/a (calculated)                                               |\n| `nix-package-url`       | The Nix package URL                                                                                                                                                                                                                                                            | URL                                        |                                                                |\n| `planner`               | The installation [planner] to use                                                                                                                                                                                                                                              | enum (`linux` or `macos`)                  |                                                                |\n| `reinstall`             | Force a reinstall if an existing installation is detected (consider backing up `/nix/store`)                                                                                                                                                                                   | Boolean                                    | `false`                                                        |\n| `start-daemon`          | If the daemon should be started, requires `planner: linux-multi`                                                                                                                                                                                                               | Boolean                                    | `false`                                                        |\n| `trust-runner-user`     | Whether to make the runner user trusted by the Nix daemon                                                                                                                                                                                                                      | Boolean                                    | `true`                                                         |\n| `diagnostic-endpoint`   | Diagnostic endpoint url where the installer sends install [diagnostic reports](https://github.com/DeterminateSystems/nix-installer#diagnostics) to, to disable set this to an empty string                                                                                     | string                                     | `https://install.determinate.systems/nix-installer/diagnostic` |\n| `proxy`                 | The proxy to use (if any), valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL`                                                                                                                                                                             | string                                     |                                                                |\n| `ssl-cert-file`         | An SSL cert to use (if any), used for fetching Nix and sets `NIX_SSL_CERT_FILE` for Nix                                                                                                                                                                                        | string                                     |                                                                |\n\n[apfs]: https://en.wikipedia.org/wiki/Apple_File_System\n[backtrace]: https://doc.rust-lang.org/std/backtrace/index.html#environment-variables\n[github token]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication\n[planner]: https://github.com/determinateSystems/nix-installer#usage\n[profile]: https://nixos.org/manual/nix/stable/package-management/profiles\n[tracing directives]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeterminatesystems%2Fnix-installer-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeterminatesystems%2Fnix-installer-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeterminatesystems%2Fnix-installer-action/lists"}