14
14
-----
15
15
16
16
``` shell
17
- vagrant init nixos/nixos-18.09-i686
18
- # or
19
- vagrant init nixos/nixos-18.09-x86_64
17
+ vagrant init nixbox/nixos --box-version 23.11
20
18
```
21
19
22
20
Also have a look at the accompanying nixos vagrant plugin:
@@ -56,8 +54,8 @@ Have a look at the different `make build` target to build your image.
56
54
57
55
``` shell
58
56
make build-all # Build latest version for all architectures
59
- make VERSION=22.05 build # Build specific version for x86_64 architecture
60
- make VERSION=22.05 ARCH=i686 build # Build specific version for specific architecture
57
+ make VERSION=23.11 build # Build specific version for x86_64 architecture
58
+ make VERSION=23.11 ARCH=i686 build # Build specific version for specific architecture
61
59
62
60
make vagrant-add
63
61
make vagrant-push
@@ -66,18 +64,18 @@ make vagrant-push
66
64
If you build on a host that does not support Makefile, here are some examples:
67
65
68
66
``` shell
69
- packer build --only=virtualbox-iso.virtualbox -var version=22.05 --except=vagrant-cloud nixos.pkr.hcl
70
- packer build --only=qemu.qemu -var version=22.05 --except=vagrant-cloud nixos.pkr.hcl
71
- packer build --only=vmware-iso.vmware -var version=22.05 --except=vagrant-cloud nixos.pkr.hcl
72
- packer build -var-file= " nixos.auto.pkvars.hcl " -- only=hyperv-iso.hyperv --except=vagrant-cloud nixos.pkr.hcl
67
+ packer build --only=virtualbox-iso.virtualbox -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl
68
+ packer build --only=qemu.qemu -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl
69
+ packer build --only=vmware-iso.vmware -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl
70
+ packer build -- only=hyperv-iso.hyperv -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl
73
71
```
74
72
75
73
The vagrant .box image is now ready to go and you can use it in vagrant:
76
74
77
75
``` shell
78
- vagrant box add nixbox32 nixos-22.05 -libvirt-i686.box
76
+ vagrant box add nixbox32 nixos-23.11 -libvirt-i686.box
79
77
# or
80
- vagrant box add nixbox64 nixos-22.05 -virtualbox-x86_64.box
78
+ vagrant box add nixbox64 nixos-23.11 -virtualbox-x86_64.box
81
79
```
82
80
83
81
Troubleshooting
@@ -101,7 +99,7 @@ Vagrant.configure("2") do |config|
101
99
102
100
# Use a suitable NixOS base. VM built with nixbox are tested to work with
103
101
# this plugin.
104
- config.vm.box = " nixos-22.05 "
102
+ config.vm.box = " nixos-23.11 "
105
103
106
104
# Add the htop package
107
105
config.vm.provision :nixos ,
0 commit comments