{"id":13983995,"url":"https://github.com/nix-community/nixbox","last_synced_at":"2025-05-15T22:03:43.068Z","repository":{"id":46616910,"uuid":"8012443","full_name":"nix-community/nixbox","owner":"nix-community","description":"NixOS Vagrant boxes [maintainer=@ifurther]","archived":false,"fork":false,"pushed_at":"2024-12-16T17:40:11.000Z","size":1674,"stargazers_count":321,"open_issues_count":17,"forks_count":102,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-04T04:31:45.564Z","etag":null,"topics":["libvirt","nix","nixos","packer","qemu","vagrant","virtualbox"],"latest_commit_sha":null,"homepage":"https://app.vagrantup.com/nixbox/","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nix-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"nix-community"}},"created_at":"2013-02-04T17:37:37.000Z","updated_at":"2025-04-04T04:27:58.000Z","dependencies_parsed_at":"2024-11-06T17:23:14.508Z","dependency_job_id":"5b0f1fbd-81aa-444f-b6a1-58592622a97e","html_url":"https://github.com/nix-community/nixbox","commit_stats":{"total_commits":175,"total_committers":28,"mean_commits":6.25,"dds":0.64,"last_synced_commit":"b39fc572d1bd2f5042584177c7f340b166a9e4f7"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nix-community","download_url":"https://codeload.github.com/nix-community/nixbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675597,"owners_count":20977378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libvirt","nix","nixos","packer","qemu","vagrant","virtualbox"],"created_at":"2024-08-09T05:02:07.452Z","updated_at":"2025-04-08T08:16:12.038Z","avatar_url":"https://github.com/nix-community.png","language":"HCL","funding_links":["https://opencollective.com/nix-community"],"categories":["Ruby","HCL"],"sub_categories":[],"readme":"NixOS boxes for Vagrant\n=======================\n\n[NixOS](http://nixos.org) is a linux distribution based on a purely functional\npackage manager. This project builds [vagrant](http://vagrantup.com) .box\nimages.\n\nStatus\n------\n\nstable\n\nUsage\n-----\n\n```shell\nvagrant init nixbox/nixos --box-version 23.11\n```\n\nAlso have a look at the accompanying nixos vagrant plugin:\n\u003chttps://github.com/nix-community/vagrant-nixos-plugin\u003e\n\nAuto Vars File\n--------------\n\n### iso_checksums\n\nThe `nixos.auto.pkvars.hcl` file contains two defined variables that are\nrequired to build a box. The packer template will dereference the iso checksum\nfrom the `iso_checksums` variable. If a checksum does not exist for the version\nand architecture you are trying to build, the packer build will fail. Be sure\nto add the proper checksum for the ISO you would like to use to the\n`iso_checksums` map, if it does not already exist, before building.\n\n### version\n\nUse the `version` variable to set the version of NixOS you want to build. By\nconvention, this is usually set to the latest stable version of NixOS.\n\nBuilding the images\n-------------------\n\nFirst install [packer](http://packer.io) and\n[virtualbox](https://www.virtualbox.org/).\n\nFour packer builders are currently supported:\n\n- BIOS\n\t- Virtualbox (`BUILDER=virtualbox-iso.virtualbox`)\n\t- qemu / libvirt (`BUILDER=qemu.qemu`)\n\t- VMware (`BUILDER=vmware-iso.vmware`)\n\t- Hyper-V (`BUILDER=hyperv-iso.hyperv`)\n- UEFI\n        - Virtualbox (`BUILDER=virtualbox-iso.virtualbox-efi`)\n        - qemu / libvirt (`BUILDER=qemu.qemu-efi`)\n\nHave a look at the different `make build` target to build your image.\n\n```shell\nmake build-all # Build latest version for all architectures\nmake VERSION=23.11 build # Build specific version for x86_64 architecture\nmake VERSION=23.11 ARCH=i686 build # Build specific version for specific architecture\n\nmake vagrant-add\nmake vagrant-push\n```\n\nIf you build on a host that does not support Makefile, here are some examples:\n\n```shell\npacker build --only=virtualbox-iso.virtualbox -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl\npacker build --only=qemu.qemu -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl\npacker build --only=vmware-iso.vmware -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl\npacker build --only=hyperv-iso.hyperv -var version=23.11 --except=vagrant-cloud nixos.pkr.hcl\n```\n\nThe vagrant .box image is now ready to go and you can use it in vagrant:\n\n```shell\nvagrant box add nixbox32 nixos-23.11-libvirt-i686.box\n# or\nvagrant box add nixbox64 nixos-23.11-virtualbox-x86_64.box\n```\n\nTroubleshooting\n---------------\n\n- If you build on a Windows OS, please make sure you keep the unix file\n  encoding of the generated configuration files (see [issue\\#30](https://github.com/nix-community/nixbox/issues/30)\n\n- Timeouts are a common issue for build failures. These can be a bit tough to\n  figure out. increase the `boot_wait` value in `nixos.auto.pkvars.hcl` if you\n  think timeouts may be the cause of your build failures.\n\nSample Vagrantfile\n------------------\n\n```ruby\nVagrant.configure(\"2\") do |config|\n\n  # Disable shared virtualbox mount path (not vboxsf installed on guest)\n  config.vm.synced_folder '.', '/vagrant', disabled: true\n\n  # Use a suitable NixOS base. VM built with nixbox are tested to work with\n  # this plugin.\n  config.vm.box = \"nixos-23.11\"\n\n  # Add the htop package\n  config.vm.provision :nixos,\n    run: 'always',\n    expression: {\n      environment: {\n        systemPackages: [ :htop ]\n      }\n    }\n\nend\n```\n\nLicense\n-------\n\nCopyright 2022 under the MIT\nCopyright 2015 under the MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fnixbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnix-community%2Fnixbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fnixbox/lists"}