Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Differing from the upstream [Nix](https://github.com/NixOS/nix) installer script
| `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` |
| `proxy` | The proxy to use (if any), valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL` | string | |
| `ssl-cert-file` | An SSL cert to use (if any), used for fetching Nix and sets `NIX_SSL_CERT_FILE` for Nix | string | |
| `timeout` | Timeout in milliseconds for fetching the Nix installer binary | integer | `10000` |

[apfs]: https://en.wikipedia.org/wiki/Apple_File_System
[backtrace]: https://doc.rust-lang.org/std/backtrace/index.html#environment-variables
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ inputs:
proxy:
description: "The proxy to use (if any), valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL`"
required: false
timeout:
description: Timeout in milliseconds for fetching the Nix installer
required: false
default: "10000"
mac-case-sensitive:
description: "Use a case sensitive volume (`planner: macos` only)"
required: false
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class NixInstallerAction extends DetSysAction {
logger: string | null;
sslCertFile: string | null;
proxy: string | null;
timeout: number | null;
macCaseSensitive: string | null;
macEncrypt: string | null;
macRootDisk: string | null;
Expand Down Expand Up @@ -123,6 +124,7 @@ class NixInstallerAction extends DetSysAction {
this.logger = inputs.getStringOrNull("logger");
this.sslCertFile = inputs.getStringOrNull("ssl-cert-file");
this.proxy = inputs.getStringOrNull("proxy");
this.timeout = inputs.getNumberOrNull("timeout");
this.macCaseSensitive = inputs.getStringOrNull("mac-case-sensitive");
this.macEncrypt = inputs.getStringOrNull("mac-encrypt");
this.macRootDisk = inputs.getStringOrNull("mac-root-disk");
Expand Down Expand Up @@ -929,7 +931,7 @@ class NixInstallerAction extends DetSysAction {

private async fetchBinary(): Promise<string> {
if (!this.localRoot) {
return await this.fetchExecutable();
return await this.fetchExecutable(this.timeout ?? undefined);
} else {
const localPath = join(this.localRoot, `nix-installer-${this.platform}`);
actionsCore.info(`Using binary ${localPath}`);
Expand Down