Skip to content

Commit

Permalink
virtualisation/vagrant-virtualbox: use system.build.image
Browse files Browse the repository at this point in the history
  • Loading branch information
phaer committed Nov 29, 2024
1 parent 6cc7449 commit 342a502
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nixos/modules/virtualisation/vagrant-virtualbox-image.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vagrant + VirtualBox

{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:

{
imports = [
Expand All @@ -22,8 +22,11 @@

# generate the box v1 format which is much easier to generate
# https://www.vagrantup.com/docs/boxes/format.html
image.extension = lib.mkOverride 999 "${config.image.baseName}.box";
system.nixos.tags = [ "vagrant"];
system.build.image = lib.mkOverride 999 config.system.build.vagrantVirtualbox;
system.build.vagrantVirtualbox = pkgs.runCommand
"virtualbox-vagrant.box"
config.image.fileName
{}
''
mkdir workdir
Expand Down

0 comments on commit 342a502

Please sign in to comment.