#!/usr/bin/env sh [ "$#" -ne 2 ] && { echo "Usage: $1 " exit 2 } ssh_url="$1" host_name="$2" root="$(git rev-parse --show-toplevel)" nix run github:numtide/nixos-anywhere -- \ --flake ".#$host_name" \ --target-host "$ssh_url" \ --generate-hardware-config nixos-generate-config "$root/hardware_config_$host_name.nix" \ --generate-hardware-config nixos-facter "$root/hardware_config_$host_name.json" # vim: ft=sh