dotfiles/build-vm.sh

22 lines
418 B
Bash
Raw Normal View History

2023-11-22 00:52:31 +01:00
#/usr/bin/env sh
# Build a NixOS VM for testing
#
# For x86_64 hosts: use curacao config
# For aarch64 hosts: use pindakaas config
2023-11-22 01:51:48 +01:00
if ! command -v nom-build
then
exec nix-shell -p nix-output-monitor --run $0
fi
2023-11-22 00:52:31 +01:00
if [ "$(uname -m)" == "x86_64" ]
then
config=./curacao.nix
elif [ "$(uname -m)" == "aarch64" ]
then
config=./pindakaas.nix
fi
2023-11-22 01:51:48 +01:00
nom-build '<nixpkgs/nixos>' -A vm \
-I nixos-config=${config}