format files with nixfmt
This commit is contained in:
parent
e6b629da27
commit
40142caad0
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
@ -29,31 +29,31 @@
|
|||||||
mkdir workdir
|
mkdir workdir
|
||||||
cd workdir
|
cd workdir
|
||||||
|
|
||||||
# 1. create that metadata.json file
|
# 1. create that metadata.json file
|
||||||
echo '{"provider":"virtualbox"}' > metadata.json
|
echo '{"provider":"virtualbox"}' > metadata.json
|
||||||
|
|
||||||
# 2. create a default Vagrantfile config
|
# 2. create a default Vagrantfile config
|
||||||
cat <<VAGRANTFILE > Vagrantfile
|
cat <<VAGRANTFILE > Vagrantfile
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.base_mac = "0800275F0936"
|
config.vm.base_mac = "0800275F0936"
|
||||||
end
|
end
|
||||||
VAGRANTFILE
|
VAGRANTFILE
|
||||||
|
|
||||||
# 3. add the exported VM files
|
# 3. add the exported VM files
|
||||||
tar xvf ${config.system.build.virtualBoxOVA}/*.ova
|
tar xvf ${config.system.build.virtualBoxOVA}/*.ova
|
||||||
|
|
||||||
# 4. move the ovf to the fixed location
|
# 4. move the ovf to the fixed location
|
||||||
mv *.ovf box.ovf
|
mv *.ovf box.ovf
|
||||||
|
|
||||||
# 5. generate OVF manifest file
|
# 5. generate OVF manifest file
|
||||||
rm *.mf
|
rm *.mf
|
||||||
touch box.mf
|
touch box.mf
|
||||||
for fname in *; do
|
for fname in *; do
|
||||||
checksum=$(sha256sum $fname | cut -d' ' -f 1)
|
checksum=$(sha256sum $fname | cut -d' ' -f 1)
|
||||||
echo "SHA256($fname)= $checksum" >> box.mf
|
echo "SHA256($fname)= $checksum" >> box.mf
|
||||||
done
|
done
|
||||||
|
|
||||||
# 6. compress everything back together
|
# 6. compress everything back together
|
||||||
tar --owner=0 --group=0 --sort=name --numeric-owner -czf $out .
|
tar --owner=0 --group=0 --sort=name --numeric-owner -czf $out .
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
boolToStr = value: if value then "on" else "off";
|
boolToStr = value: if value then "on" else "off";
|
||||||
cfg = config.vmware;
|
cfg = config.vmware;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user