Add initial config table to README
This commit is contained in:
parent
f5af9fdafc
commit
2fa855f5ce
39
README.md
39
README.md
|
@ -21,3 +21,42 @@ jobs:
|
||||||
```
|
```
|
||||||
|
|
||||||
See [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for a full example.
|
See [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for a full example.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
| Parameter | Description | Type | Default |
|
||||||
|
| :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------- | :---------------------------------------- |
|
||||||
|
| `backtrace` | The setting for [`RUST_BACKTRACE`][backtrace] | string | |
|
||||||
|
| `extra-args` | Extra arguments to pass to the planner (prefer using structured `with:` arguments unless using a custom [planner]!) | string | |
|
||||||
|
| `extra-conf` | Extra configuration lines for `/etc/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set) | string | |
|
||||||
|
| `github-token` | A [GitHub token] for making authenticated requests (which have a higher rate-limit quota than unauthenticated requests) | string | `${{ github.token }}` |
|
||||||
|
| `init` | The init system to configure (requires `planner: linux-multi`) | enum (`none` or `systemd`) | |
|
||||||
|
| `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` |
|
||||||
|
| `log-directives` | A list of [tracing directives], comma separated with `-`s replaced with `_` (eg. `nix_installer=trace`) | string | |
|
||||||
|
| `logger` | The logger to use during installation | enum (`pretty`, `json`, `full`, `compact`) | |
|
||||||
|
| `mac-case-sensitive` | Use a case-sensitive volume (`planner: macos` only) | Boolean | `false` |
|
||||||
|
| `mac-encrypt` | Force encryption on the volume (`planner: macos` only) | Boolean | `false` |
|
||||||
|
| `mac-root-disk` | The root disk of the target (`planner: macos` only) | string | |
|
||||||
|
| `mac-volume-label` | The label for the created [APFS] volume (`planner: macos` only) | string | |
|
||||||
|
| `modify-profile` | Modify the user [profile] to automatically load Nix | Boolean | `false` |
|
||||||
|
| `nix-build-group-id` | The Nix build group GID | integer | |
|
||||||
|
| `nix-build-group-name` | The Nix build group name | string | |
|
||||||
|
| `nix-build-user-base` | The Nix build user base UID (ascending) | integer | |
|
||||||
|
| `nix-build-user-prefix` | The Nix build user prefix (user numbers will be postfixed) | string | |
|
||||||
|
| `nix-installer-branch` | The branch of `nix-installer` to use (conflicts with the `nix-installer-tag`, `nix-installer-revision`, and `nix-installer-branch`) | string | |
|
||||||
|
| `nix-installer-pr` | The pull request of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, and `nix-installer-branch`) | integer | |
|
||||||
|
| `nix-installer-revision` | The revision of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-branch`, and `nix-installer-pr`) | string | |
|
||||||
|
| `nix-installer-tag` | The tag of `nix-installer` to use (conflicts with `nix-installer-revision`, `nix-installer-branch`, `nix-installer-pr`) | string | |
|
||||||
|
| `nix-installer-url` | A URL pointing to a `nix-installer.sh` script | URL | `https://install.determinate.systems/nix` |
|
||||||
|
| `nix-package-url` | The Nix package URL | URL | |
|
||||||
|
| `planner` | The installation [planner] to use | enum (`linux-multi` or `macos`) | |
|
||||||
|
| `reinstall` | Force a reinstall if an existing installation is detected (consider backing up `/nix/store`) | Boolean | `false` |
|
||||||
|
| `start-daemon` | If the daemon should be started, requires `planner: linux-multi` | Boolean | `false` |
|
||||||
|
| `trust-runner-user` | Whether to make the runner user trusted by the Nix daemon | Boolean | `true` |
|
||||||
|
|
||||||
|
[apfs]: https://en.wikipedia.org/wiki/Apple_File_System
|
||||||
|
[backtrace]: https://doc.rust-lang.org/std/backtrace/index.html#environment-variables
|
||||||
|
[github token]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
|
||||||
|
[planner]: https://github.com/determinateSystems/nix-installer#usage
|
||||||
|
[profile]: https://nixos.org/manual/nix/stable/package-management/profiles
|
||||||
|
[tracing directives]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
|
||||||
|
|
129
action.yml
129
action.yml
|
@ -1,86 +1,65 @@
|
||||||
name: Nix Installer
|
name: Nix Installer
|
||||||
branding:
|
branding:
|
||||||
icon: 'box'
|
icon: "box"
|
||||||
color: 'purple'
|
color: "purple"
|
||||||
description: Install Nix
|
description: Install Nix
|
||||||
inputs:
|
inputs:
|
||||||
planner:
|
backtrace:
|
||||||
description: A planner to use
|
description: The setting for `RUST_BACKTRACE` (see https://doc.rust-lang.org/std/backtrace/index.html#environment-variables)
|
||||||
|
required: false
|
||||||
|
channels:
|
||||||
|
description: Channel(s) to add (eg `nixpkgs=https://nixos.org/channels/nixpkgs-unstable`)
|
||||||
required: false
|
required: false
|
||||||
extra-args:
|
extra-args:
|
||||||
description: Extra args to pass to the planner (prefer using structured `with:` arguments unless using a custom planner!)
|
description: Extra args to pass to the planner (prefer using structured `with:` arguments unless using a custom planner!)
|
||||||
required: false
|
required: false
|
||||||
github-token:
|
|
||||||
description: A GitHub Token for making authenticated requests (which have a higher rate-limit quota than unauthenticated requests)
|
|
||||||
default: ${{ github.token }}
|
|
||||||
trust-runner-user:
|
|
||||||
description: Whether to make the runner user trusted by the Nix daemon
|
|
||||||
default: "true"
|
|
||||||
channels:
|
|
||||||
description: Channel(s) to add (eg `nixpkgs=https://nixos.org/channels/nixpkgs-unstable`)
|
|
||||||
required: false
|
|
||||||
modify-profile:
|
|
||||||
description: Modify the user profile to automatically load nix
|
|
||||||
required: false
|
|
||||||
nix-build-user-count:
|
|
||||||
description: Number of build users to create
|
|
||||||
required: false
|
|
||||||
nix-build-group-name:
|
|
||||||
description: The Nix build group name
|
|
||||||
required: false
|
|
||||||
nix-build-group-id:
|
|
||||||
description: The Nix build group GID
|
|
||||||
required: false
|
|
||||||
nix-build-user-prefix:
|
|
||||||
description: The Nix build user prefix (user numbers will be postfixed)
|
|
||||||
required: false
|
|
||||||
nix-build-user-base:
|
|
||||||
description: The Nix build user base UID (ascending)
|
|
||||||
required: false
|
|
||||||
nix-package-url:
|
|
||||||
description: The Nix package URL
|
|
||||||
required: false
|
|
||||||
extra-conf:
|
extra-conf:
|
||||||
description: Extra configuration lines for `/etc/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set)
|
description: Extra configuration lines for `/etc/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set)
|
||||||
required: false
|
required: false
|
||||||
mac-encrypt:
|
github-token:
|
||||||
description: "Force encryption on the volume (`planner: macos` only)"
|
description: A GitHub token for making authenticated requests (which have a higher rate-limit quota than unauthenticated requests)
|
||||||
required: false
|
default: ${{ github.token }}
|
||||||
mac-case-sensitive:
|
|
||||||
description: "Use a case sensitive volume (`planner: macos` only)"
|
|
||||||
required: false
|
|
||||||
mac-volume-label:
|
|
||||||
description: "The label for the created APFS volume (`planner: macos` only)"
|
|
||||||
required: false
|
|
||||||
mac-root-disk:
|
|
||||||
description: "The root disk of the target (`planner: macos` only)"
|
|
||||||
required: false
|
|
||||||
start-daemon:
|
|
||||||
description: "If the daemon should be started, requires `planner: linux-multi`"
|
|
||||||
required: false
|
|
||||||
init:
|
init:
|
||||||
description: "The init system to configure, requires `planner: linux-multi` (allowing the choice between `none` or `systemd`)"
|
description: "The init system to configure, requires `planner: linux-multi` (allowing the choice between `none` or `systemd`)"
|
||||||
required: false
|
required: false
|
||||||
nix-installer-url:
|
|
||||||
description: A URL pointing to a `nix-installer.sh` script
|
|
||||||
required: false
|
|
||||||
logger:
|
|
||||||
description: The logger to use for install (eg. `pretty`, `json`, `full`, `compact`)
|
|
||||||
required: false
|
|
||||||
local-root:
|
local-root:
|
||||||
description: 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`)
|
description: A local `nix-installer` binary root, overrides the `nix-installer-url` setting (a `nix-installer.sh` script should exist, binaries should be named `nix-installer-$ARCH`, eg. `nix-installer-x86_64-linux`)
|
||||||
required: false
|
required: false
|
||||||
log-directives:
|
log-directives:
|
||||||
description: A list of Tracing directives, comma separated, `-`s replaced with `_` (eg. `nix_installer=trace`, see https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives)
|
description: A list of Tracing directives, comma separated, `-`s replaced with `_` (eg. `nix_installer=trace`, see https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives)
|
||||||
required: false
|
required: false
|
||||||
backtrace:
|
logger:
|
||||||
description: The setting for `RUST_BACKTRACE` (see https://doc.rust-lang.org/std/backtrace/index.html#environment-variables)
|
description: The logger to use for install (eg. `pretty`, `json`, `full`, `compact`)
|
||||||
required: false
|
required: false
|
||||||
nix-installer-tag:
|
mac-case-sensitive:
|
||||||
description: The tag of `nix-installer` to use (conflicts with `nix-installer-revision`, `nix-installer-branch`, `nix-installer-pr`)
|
description: "Use a case sensitive volume (`planner: macos` only)"
|
||||||
required: false
|
required: false
|
||||||
nix-installer-revision:
|
mac-encrypt:
|
||||||
description: The revision of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-branch`, `nix-installer-pr`)
|
description: "Force encryption on the volume (`planner: macos` only)"
|
||||||
|
required: false
|
||||||
|
mac-root-disk:
|
||||||
|
description: "The root disk of the target (`planner: macos` only)"
|
||||||
|
required: false
|
||||||
|
mac-volume-label:
|
||||||
|
description: "The label for the created APFS volume (`planner: macos` only)"
|
||||||
|
required: false
|
||||||
|
modify-profile:
|
||||||
|
description: Modify the user profile to automatically load nix
|
||||||
|
required: false
|
||||||
|
nix-build-group-id:
|
||||||
|
description: The Nix build group GID
|
||||||
|
required: false
|
||||||
|
nix-build-group-name:
|
||||||
|
description: The Nix build group name
|
||||||
|
required: false
|
||||||
|
nix-build-user-base:
|
||||||
|
description: The Nix build user base UID (ascending)
|
||||||
|
required: false
|
||||||
|
nix-build-user-count:
|
||||||
|
description: Number of build users to create
|
||||||
|
required: false
|
||||||
|
nix-build-user-prefix:
|
||||||
|
description: The Nix build user prefix (user numbers will be postfixed)
|
||||||
required: false
|
required: false
|
||||||
nix-installer-branch:
|
nix-installer-branch:
|
||||||
description: The branch of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-pr`)
|
description: The branch of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-pr`)
|
||||||
|
@ -88,9 +67,30 @@ inputs:
|
||||||
nix-installer-pr:
|
nix-installer-pr:
|
||||||
description: The PR of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-branch`)
|
description: The PR of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-branch`)
|
||||||
required: false
|
required: false
|
||||||
|
nix-installer-revision:
|
||||||
|
description: The revision of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-branch`, `nix-installer-pr`)
|
||||||
|
required: false
|
||||||
|
nix-installer-tag:
|
||||||
|
description: The tag of `nix-installer` to use (conflicts with `nix-installer-revision`, `nix-installer-branch`, `nix-installer-pr`)
|
||||||
|
required: false
|
||||||
|
nix-installer-url:
|
||||||
|
description: A URL pointing to a `nix-installer.sh` script
|
||||||
|
required: false
|
||||||
|
nix-package-url:
|
||||||
|
description: The Nix package URL
|
||||||
|
required: false
|
||||||
|
planner:
|
||||||
|
description: A planner to use
|
||||||
|
required: false
|
||||||
reinstall:
|
reinstall:
|
||||||
description: Force a reinstall if an existing installation is detected (consider backing up `/nix/store`)
|
description: Force a reinstall if an existing installation is detected (consider backing up `/nix/store`)
|
||||||
required: false
|
required: false
|
||||||
|
start-daemon:
|
||||||
|
description: "If the daemon should be started, requires `planner: linux-multi`"
|
||||||
|
required: false
|
||||||
|
trust-runner-user:
|
||||||
|
description: Whether to make the runner user trusted by the Nix daemon
|
||||||
|
default: "true"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
@ -127,7 +127,7 @@ runs:
|
||||||
echo "Set NIX_INSTALLER_MODIFY_PROFILE=$NIX_INSTALLER_MODIFY_PROFILE"
|
echo "Set NIX_INSTALLER_MODIFY_PROFILE=$NIX_INSTALLER_MODIFY_PROFILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${{ inputs.daemon-user-count }}" ]; then
|
if [ -n "${{ inputs.nix-build-user-count }}" ]; then
|
||||||
export NIX_INSTALLER_NIX_BUILD_USER_COUNT=${{ inputs.nix-build-user-count }}
|
export NIX_INSTALLER_NIX_BUILD_USER_COUNT=${{ inputs.nix-build-user-count }}
|
||||||
echo "Set NIX_INSTALLER_NIX_BUILD_USER_COUNT=$NIX_INSTALLER_NIX_BUILD_USER_COUNT"
|
echo "Set NIX_INSTALLER_NIX_BUILD_USER_COUNT=$NIX_INSTALLER_NIX_BUILD_USER_COUNT"
|
||||||
fi
|
fi
|
||||||
|
@ -303,6 +303,3 @@ runs:
|
||||||
if [ -n "$HTTP_PID" ]; then
|
if [ -n "$HTTP_PID" ]; then
|
||||||
kill $HTTP_PID
|
kill $HTTP_PID
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue