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

Replace Packer with Nix #96

Open
zimbatm opened this issue Jan 15, 2024 · 6 comments
Open

Replace Packer with Nix #96

zimbatm opened this issue Jan 15, 2024 · 6 comments

Comments

@zimbatm
Copy link
Member

zimbatm commented Jan 15, 2024

This is just an idea. The main downside would be that the user needs to have Nix installed, but Nix builds are generally faster, and don't require the virtualization framework to build the images. That means it would be easier to target VMWare, HyperV, VirtualBox, ...

I have a prototype somewhere in this repo I think. And also pushed this to nixpkgs a while back:
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/vagrant-guest.nix and https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/vagrant-virtualbox-image.nix

If you're interested of me going more in details @ifurther , let me know.

@ifurther
Copy link
Contributor

Sorry late replay. I think this is good for user with nix, maybe could combine together. Sometimes users can select Packer and Nix to build in other systems.

@zimbatm
Copy link
Member Author

zimbatm commented Jan 17, 2024

Ok. Is this something you're interested in pursuing? Probably, it wouldn't make sense to have both Packer and Nix recipes as it would duplicate all of the work.

@ifurther
Copy link
Contributor

Maybe the packer cloud stay in code, and new part using nix. I think some people may use the packer, and old code should help it. Dose using ci with nix to build image?

@zimbatm
Copy link
Member Author

zimbatm commented Jan 29, 2024

Up to you. They can also pull the latest image and then use Vagrant + Nix to build new custom images. Yes, we can have GitHub Actions build the images with Nix. Not sure about publishing on vagrantcloud, this part might have to be reverse-engineered.

@ifurther
Copy link
Contributor

ifurther commented Feb 3, 2024

Maybe we can use new branch to check it

@Et7f3
Copy link

Et7f3 commented Feb 18, 2024

Also it would allow to have nixos without vagrant-nixos-plugin plugin. Since we could build/share using the host.

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

No branches or pull requests

3 participants