summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/init/test.sh
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-09-27 15:42:33 +0200
committerlassulus <lassulus@lassul.us>2020-09-27 15:42:33 +0200
commit687ae7ca86bad6648ef53bf8ef5c6f335ad88037 (patch)
treeacaa20d3e825fb123a442a2e7b2ccfd826459960 /lass/5pkgs/init/test.sh
parente1251ee299af6b00dc81a76560d4810cd0a6126c (diff)
l init: update with local tests, sgdisk, etc..
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"