summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/init/test.sh
blob: 0ceaa73caa5d8a7aec111d687628a84ee6ae0085 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nixos-generators

set -xefu

WD=$(realpath $(dirname "$0"))
TMPDIR=$(mktemp -d)
cd "$TMPDIR"
nixos-generate -c "$WD"/test.nix -f vm-nogui --run "$@"
cd -
rm -r "$TMPDIR"