Skip to content

Commit

Permalink
format files with nixfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
phaer committed Nov 29, 2024
1 parent e6b629d commit 40142ca
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 29 deletions.
7 changes: 6 additions & 1 deletion nixos/modules/virtualisation/kubevirt.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:

{
imports = [
Expand Down
54 changes: 27 additions & 27 deletions nixos/modules/virtualisation/vagrant-virtualbox-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@
mkdir workdir
cd workdir
# 1. create that metadata.json file
echo '{"provider":"virtualbox"}' > metadata.json
# 2. create a default Vagrantfile config
cat <<VAGRANTFILE > Vagrantfile
Vagrant.configure("2") do |config|
config.vm.base_mac = "0800275F0936"
end
VAGRANTFILE
# 3. add the exported VM files
tar xvf ${config.system.build.virtualBoxOVA}/*.ova
# 4. move the ovf to the fixed location
mv *.ovf box.ovf
# 5. generate OVF manifest file
rm *.mf
touch box.mf
for fname in *; do
checksum=$(sha256sum $fname | cut -d' ' -f 1)
echo "SHA256($fname)= $checksum" >> box.mf
done
# 6. compress everything back together
tar --owner=0 --group=0 --sort=name --numeric-owner -czf $out .
'';
# 1. create that metadata.json file
echo '{"provider":"virtualbox"}' > metadata.json
# 2. create a default Vagrantfile config
cat <<VAGRANTFILE > Vagrantfile
Vagrant.configure("2") do |config|
config.vm.base_mac = "0800275F0936"
end
VAGRANTFILE
# 3. add the exported VM files
tar xvf ${config.system.build.virtualBoxOVA}/*.ova
# 4. move the ovf to the fixed location
mv *.ovf box.ovf
# 5. generate OVF manifest file
rm *.mf
touch box.mf
for fname in *; do
checksum=$(sha256sum $fname | cut -d' ' -f 1)
echo "SHA256($fname)= $checksum" >> box.mf
done
# 6. compress everything back together
tar --owner=0 --group=0 --sort=name --numeric-owner -czf $out .
'';
}
7 changes: 6 additions & 1 deletion nixos/modules/virtualisation/vmware-image.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
boolToStr = value: if value then "on" else "off";
cfg = config.vmware;
Expand Down

0 comments on commit 40142ca

Please sign in to comment.