summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/init/test.sh
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-10-03 13:44:30 +0200
committertv <tv@krebsco.de>2020-10-03 13:44:30 +0200
commitd1e52425e0d5d79a33b11c92cc2afb498075d953 (patch)
tree29277982f014eaae680e006b6afc7fdb42e8d9b2 /lass/5pkgs/init/test.sh
parent654f64f05935a69607a540f2e8d15619cee9e15e (diff)
parent7e7499d86302d261c8f8404fb34f2ac091318d0e (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lass/5pkgs/init/test.sh')
-rwxr-xr-xlass/5pkgs/init/test.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/lass/5pkgs/init/test.sh b/lass/5pkgs/init/test.sh
new file mode 100755
index 000000000..0ceaa73ca
--- /dev/null
+++ b/lass/5pkgs/init/test.sh
@@ -0,0 +1,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"