19 lines
1.3 KiB
Bash
Executable File
19 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# this will one day be an interactive install bootstrap script for my nix config!
|
|
# right now this shall be treated as psudocode but also just a list of steps for installing
|
|
# without further adoo:
|
|
#
|
|
# 1. boot target device into nixos installer iso
|
|
# 2. `sudo -i``
|
|
# 3. `git clone https://git.blakedheld.xyz/blake/nix.git bootstrap_nix`
|
|
# 4. if new host use `ls -l /dev/disk/by-id/` to get the id of the target disk and update the related line in the disko config for that host (or partition the target disk manually however you wish)
|
|
# 5. run the disko install command `nix run github:nix-community/disko -- --mode destroy,format,mount --flake bootstrap_nix#hostname` to just format the disk(s)
|
|
# 6. generate hardware config `nixos-generate-config --root /mnt`
|
|
# 7. create directories for keys `mkdir -p /mnt/etc/sops` `mkdir -p /mnt/home/blake/.config/sops/age`
|
|
# 8. move nix config to home dir `mv /bootstrap_nix /mnt/home/blake/.nix`
|
|
# 9. copy age keys.txt to previously made dirs `echo "<key>" | tee /mnt/etc/sops/keys.txt /mnt/home/blake/.config/sops/age/keys.txt > dev/null`
|
|
# 10. install the os (let it fail, fix it, repeat, etc) `nixos-install --flake /mnt/home/blake/.nix`
|
|
# 11. set the root password
|
|
# 12. reboot and dont forget to `sudo chown -R blake:blake /home/blake`
|
|
|