From 1ff6f0eb48961e6482ec1b7d0dd9b606e85ddc79 Mon Sep 17 00:00:00 2001 From: adikro Date: Thu, 12 Feb 2026 00:41:07 +0100 Subject: disko and bootloader changes --- scripts/setup.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 scripts/setup.sh (limited to 'scripts/setup.sh') diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100644 index 0000000..a3b0cb2 --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Automate the post-reboot steps +sudo mkdir -p /mnt/usb && sudo mount /dev/sdb1 /mnt/usb +gpg --import /mnt/usb/private.asc +gpg --import /mnt/usb/public.asc +gpg --import-ownertrust /mnt/usb/trust.txt + +# Setup the repo properly +sudo mkdir -p /etc/nixos +sudo chown -R $USER:users /etc/nixos +git clone git@codeberg.org:adikro/nixos-config.git /etc/nixos + +# Fix hardware config for the actual live system +sudo rm /etc/nixos/hosts/desktop/hardware-configuration.nix +sudo nixos-generate-config --no-filesystems --root / +# Move it to the right place +sudo mv /etc/nixos/hardware-configuration.nix /etc/nixos/hosts/desktop/ + +# Update SOPS with new SSH key +NEW_AGE=$(ssh-to-age < /etc/ssh/ssh_host_ed25519_key.pub) +echo "New Age Key: $NEW_AGE" +# You'll still need to manually edit .sops.yaml unless you use 'sed' to replace the key -- cgit v1.3