dotfiles/build-vm.sh
Geoffrey Frogeye ee178b7d57
nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
2023-11-26 23:58:22 +01:00

22 lines
418 B
Bash
Executable file

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