NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.13k stars 1.47k forks source link

How to install Nix in private subnet? #2787

Open vitaliy-zinchenko opened 5 years ago

vitaliy-zinchenko commented 5 years ago

I need to install the nix-package manager to the EC2 instance in private subnet.

The VPC endpoint policies allow to talk to S3. That is why I put (for now in my test bucket) the nix release package in S3 bucket. But the install script tries to download the default nix channel from the internet (https://nixos.org/channels/nixpkgs-unstable). And I didn't find the way to provide the custom nix channel in the install script (without modifying the install script).

How can we install nix package manager in private subnet?

matthewbauer commented 5 years ago

I don't think this is currently supported. I had an attempt to accomplish this previously, but never had enough time to get it working:

https://github.com/NixOS/nix/pull/2135

Alternatively, you can do something like this:

Static Nix builds are also possible: https://matthewbauer.us/blog/static-nix.html

bjornfor commented 5 years ago

But the install script tries to download the default nix channel from the internet [...]

A low-hanging fruit is merging https://github.com/NixOS/nix/pull/2679

I also attempted adding a "--channel URL" option to the installer script, but that was rejected: https://github.com/NixOS/nix/pull/1284/commits/013e5a80eb48c0b06c71b9149391d9b532e205d6.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

stale[bot] commented 2 years ago

I closed this issue due to inactivity. → More info