virtualisation/vagrant-virtualbox: use system.build.image

This commit is contained in:
phaer 2024-11-15 00:11:59 +01:00
parent 6cc7449e30
commit 342a5021df

View File

@ -1,6 +1,6 @@
# Vagrant + VirtualBox
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
imports = [
@ -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