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

Integrate into Nix? #34

Open
davidak opened this issue Aug 26, 2019 · 11 comments · Fixed by NixOS/nixpkgs#67820
Open

Integrate into Nix? #34

davidak opened this issue Aug 26, 2019 · 11 comments · Fixed by NixOS/nixpkgs#67820

Comments

@davidak
Copy link
Contributor

davidak commented Aug 26, 2019

Are there ideas or plans to integrate this into Nix?

@zimbatm
Copy link
Member

zimbatm commented Aug 26, 2019

Not that I know of. @Lassulus ?

@zimbatm zimbatm closed this as completed Aug 26, 2019
@zimbatm zimbatm reopened this Aug 26, 2019
@Lassulus
Copy link
Collaborator

Lassulus commented Aug 26, 2019

I think it would be cool. I will try to do it, when I get some free time again.
Also people asked for it at cccamp

@davidak
Copy link
Contributor Author

davidak commented Sep 2, 2019

With "Integrate into Nix" i mean include in Nix, the package manager and build tool, not package it in nixpkgs. But that's a first step.

I thought about something like:

nix build image -f channel:nixos-17.03 -c configuration.nix -f iso

It first could just use this tool but later be implemented in C++ when the design is stable.

This can then be used to build official images.

@zimbatm
Copy link
Member

zimbatm commented Sep 2, 2019

Maybe it can be added to nixos-rebuild since it's nixos related. And nixos-rebuild already has the build-vm command after all.

@davidak
Copy link
Contributor Author

davidak commented Sep 2, 2019

I think nixos-rebuild is one of the old commands and should be replaced by a user friendly sucessor like nixos. I don't know what the plans are there.

So the question is, do you think it makes sense to integrate this tool into official Nix/NixOS tooling longterm?

Then we can open an issue there to discuss it.

@zimbatm
Copy link
Member

zimbatm commented Sep 2, 2019

Yeah why not. The important part first is to define a set of interfaces that make this work easily extensible.

For example if we stored all the profiles under <nixpkgs/nixos/profiles/images/<image-name>.nix and then had a 1:1 relationship between the image-name and the output attribute (currently hacked with formatAttr). Then it would be easy to build a tool around that.

@zimbatm
Copy link
Member

zimbatm commented Sep 2, 2019

Related to that, I think all the nixos profiles should be moved under <nixpkgs/nixos/profiles> and have a profilesPath added to nixos so they become easily referencable without using the <> notation. Right now both the nixos modules and profiles are mixed under the same <nixpkgs/nixos/modules> prefix which makes them hard to distinguish (and some under <nixpkgs/maintainers/scripts>).

@davidak
Copy link
Contributor Author

davidak commented Sep 2, 2019

Yes. Do you want to open an issue upstream for that?

@zimbatm zimbatm reopened this Sep 2, 2019
@zimbatm
Copy link
Member

zimbatm commented Sep 2, 2019

Maybe we can work on it here since it will probably be drowned with the other issues upstream. Either works for me.

@Mic92
Copy link
Member

Mic92 commented Apr 7, 2020

nixos-generator is part of nixpkgs at least.

@blaggacao
Copy link
Contributor

blaggacao commented Oct 14, 2020

  • Integrating this into nix would ensure first class support over time.
  • Packaging images, just before enlisting hosts with for example morph is a common enough bootstrapping problem when using NixOS in production.

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 a pull request may close this issue.

5 participants