diff options
| author | adikro <adikro@disroot.org> | 2026-02-12 00:41:07 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-02-12 00:41:07 +0100 |
| commit | 1ff6f0eb48961e6482ec1b7d0dd9b606e85ddc79 (patch) | |
| tree | 62099e5c57c7ffe92777f800ec45ee5d68a16ecf /scripts/setup.sh | |
| parent | 233e5fb7d43a0736857ee6b9f74967f03b73837c (diff) | |
disko and bootloader changes
Diffstat (limited to 'scripts/setup.sh')
| -rw-r--r-- | scripts/setup.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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 |
