#!/usr/bin/env nix-shell #!nix-shell -i bash -p git nixos-install-tools nix-output-monitor if [ $# -ne 1 ]; then echo "Usage: $0 " 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