From aa4dacb3afcbdbc55508cdfcfb1c0a467ec644e9 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sun, 13 Jul 2025 10:28:52 -0700 Subject: [PATCH] Add bootstrap script Adds a very simple bootstrap script for setting up a new host. I'm not exactly sure the best way to use this yet. Though I suppose it could be run with some sort of "curl https://blahblah | bash" shenanigans. That just seems like it would be about as much effort as just running the nixos-rebuild command itself from a new host. In any case though, this worked well for bootstrapping a new wixos instance. So that was nice. --- bootstrap.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 bootstrap.sh diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..329f1b3 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# bootstrap.sh +# Usage: sudo ./bootstrap.sh +set -euo pipefail + +NEW_HOSTNAME="${1:?missing hostname}" +FLAKE_URI="git+https://git.johnogle.info/johno/nixos-configs.git#${NEW_HOSTNAME}" + +export NIX_CONFIG="experimental-features = nix-command flakes" +nixos-rebuild switch --flake "$FLAKE_URI" +