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

Use only Nix? #9

Open
wmertens opened this issue Mar 18, 2016 · 3 comments
Open

Use only Nix? #9

wmertens opened this issue Mar 18, 2016 · 3 comments
Assignees

Comments

@wmertens
Copy link

I wonder, wouldn't it be more efficient to install Nix (as root) and then install the necessary packages for stage1 and 2 using Nix? Then there wouldn't be a need to download the ISO or to have squashfs.

The packages that make the ISO can simply be installed from the nixos channel, right?

@jeaye
Copy link
Owner

jeaye commented Mar 18, 2016

On Fri, Mar 18, 2016 at 05:37:17AM -0700, Wout Mertens wrote:

I wonder, wouldn't it be more efficient to install Nix (as root) and then install the necessary packages for stage1 and 2 using Nix? Then there wouldn't be a need to download the ISO or to have squashfs.

The packages that make the ISO can simply be installed from the nixos channel, right?

I think a good deal of this could be changed to Nix, but certainly Nix
would end up using bash literals as well. With that said, I'm not very
good at Nix, so this ended up being in bash to be most portable.

If you'd like to cook up an Nix version, we can definitely talk about
bringing it in; I don't see why it wouldn't work.

@jeaye jeaye self-assigned this Apr 18, 2016
@wmertens
Copy link
Author

@elitak made a sort of nixos-in-place with just Nix, see NixOS/nixpkgs#2079 (comment) and the ensuing discussion.

Basically, you can build nixos-install while running on the host OS and then run it.

@wmertens
Copy link
Author

Note: I'm giving something like this a shot again, and so far I came up with

nix-build '<nixpkgs/nixos>' -A config.system.build.nixos-generate-config -I nixos-config=/nix/store/75yffgx3600s8cwdmmzz9803k88ppxmv-nixpkgs-20.09pre221814.10100a97c89/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix

to get nixos-generate-config from a regular nix install. nixos-install is the same.

So this just needs the nixos-in-place.nix configuration and a wrapper to call everything.

It would probably be better to move the installer scripts to a regular package though, that's easier than the above, and then it'd be something like nix-shell -p nixos-in-place to get everything in one go, no iso download needed.

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

No branches or pull requests

2 participants