Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NIX_PATH action input #18

Merged
merged 1 commit into from May 28, 2020
Merged

Conversation

Gerschtli
Copy link
Contributor

@Gerschtli Gerschtli commented Dec 15, 2019

Hey, this adds a new input named nixpkgs as default nixpkgs channel.

Resolves #17.
Resolves #6.

@domenkozar
Copy link
Member

Wouldn't be setting NIX_PATH #6 be somewhat the same? I quite dislike channels, ideally, we'd disable Nix installation to set up a channel altogether.

@Gerschtli
Copy link
Contributor Author

You mean like NIX_PATH=nixpkgs=channel:nixos-19.09? In this Environment it wouldn't make any differences I think.

@Gerschtli Gerschtli force-pushed the add-nixpkgs branch 4 times, most recently from 32fc14b to 069cd85 Compare February 19, 2020 20:08
@Gerschtli Gerschtli changed the title Add nixpkgs action input Add NIX_PATH action input Feb 19, 2020
@Gerschtli Gerschtli force-pushed the add-nixpkgs branch 3 times, most recently from 2193822 to 1659319 Compare February 19, 2020 20:16
@Gerschtli
Copy link
Contributor Author

I added NIX_PATH as action input and went with the backwards compatible way. Of course I can set NIX_PATH arg to required to be more strict, but this decision is up to you :)

@Gerschtli
Copy link
Contributor Author

Rebased PR to recent changes in master

@Mic92
Copy link
Contributor

Mic92 commented May 9, 2020

I tried this branch using:

    - uses: Gerschtli/install-nix-action@4a3097b877f501d409dc2c7e95dd6c3809ba1e43
      with:
        NIX_PATH: nixpkgs=channel:nixos-unstable

but it fails finding @actions/core: https://github.com/Mic92/nur-packages/runs/658701232

What I am doing wrong?

@Gerschtli
Copy link
Contributor Author

Try the branch nix-path, in this branch I have pushed the node_modules folder which is necessary. It will be created in the release process of this action.

@Mic92
Copy link
Contributor

Mic92 commented May 9, 2020

@domenkozar
Copy link
Member

domenkozar commented May 12, 2020

I guess this would allow us to tell installer to skip setting up a channel and save ~10s of installation time :) NixOS/nix#3588

@Gerschtli
Copy link
Contributor Author

Oh awesome, did know of this option!

@domenkozar
Copy link
Member

I think I'd prefer the following behavior:

  • by default it would do as currently, let installation set the channel
  • nixPath: false would disable channel and enforce empty NIX_PATH
  • nixPath: ... would set NIX_PATH and disable the channel

@domenkozar
Copy link
Member

I've implemented skip_adding_nixpkgs_channel in #33 and what's missing is just adding docs for NIX_PATH

@Mic92
Copy link
Contributor

Mic92 commented May 28, 2020

Cool. I switched back to the official install-nix-action and just the NIX_PATH manually: https://github.com/Mic92/nur-packages/blob/46606aa4ceb2f7e1c6c1824e35bde4339760f666/.github/workflows/build.yml

@Gerschtli
Copy link
Contributor Author

PTAL

@domenkozar domenkozar merged commit 2ebff14 into cachix:master May 28, 2020
@domenkozar
Copy link
Member

Thanks for the patience @Gerschtli :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set nixpkgs channel Allow setting NIX_PATH
3 participants