Warning
This library is in an early, experimental stage and may lack complete functionality. It is intended for testing and feedback purposes only. Use at your own risk as stability is not guaranteed.
A nix library for render, run and manage declarative HashiCorp Vagrant config files powered by nixago and CUE Lang.
- Make Vagrantfiles from nix
- Manage vagrant machine lifecycle
- Batteries includes box runner
vagrant.file.cumulus =
pkgs.writeShellScriptBin "result"
(nix-vagrant.lib."${system}".make "Vagrantfile" {
name = "machine1";
provider = "vmware_fusion";
box = "CumulusCommunity/cumulus-vx";
gui = false;
}).shellHook;$ nix run .#vagrant.x86_64-linux.file.cumulus
vagrant.machine.windows = nix-vagrant.lib."${system}".machine {
package = pkgs.vagrant;
config = {
name = "windows1";
provider = "virtualbox";
box = "gusztavvargadr/windows-11";
gui = true;
};
init = {
launchScript = "powershell -noninteractive -executionpolicy unrestricted - < C:/";
script = ''
echo Hello from Windows!
'';
};
};$ nix run .#vagrant.x86_64-linux.machine.windows.up
$ nix run .#vagrant.x86_64-linux.machine.windows.ssh
$ nix run .#vagrant.x86_64-linux.machine.windows.destroy
$ nix run .#vagrant.x86_64-linux.machine.windows.ssh-config
$ nix run .#vagrant.x86_64-linux.machine.windows.provision
packages.start = nix-vagrant.lib."${system}".runner {
config = {
name = "windows1";
provider = "virtualbox";
box = "gusztavvargadr/windows-11";
gui = false;
};
};$ nix run .#start

