1 files changed, 17 insertions, 0 deletions
diff --git a/mkiso.sh b/mkiso.sh
new file mode 100755
index 0000000..9815e13
--- /dev/null
+++ b/mkiso.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p git nixos-install-tools nix-output-monitor
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <config>"
+ echo "NOTE: hardware config will be generated from root!"
+ echo "Defined configs:"
+ cat flake.nix | grep '.lib.nixosSystem' | sed 's/ =.*//' | sed 's/^[ \t]*//;s/[ \t]*$//' | while read cfg; do echo " - $cfg"; done
+ exit 1
+fi
+
+CONFIG=$1
+
+DERIVATION=".#nixosConfigurations.${CONFIG}.config.system.build.isoImage"
+EXTRA_NIX_FLAGS="-L --accept-flake-config"
+EXTRA_NIXOS_REBUILD_FLAGS="--use-remote-sudo --offline --fast"
+
+nom build $DERIVATION $EXTRA_NIX_FLAGS || exit 1
|