feat(nixos-anywhere): add deploy script and docs in README.md
This commit is contained in:
parent
9a84dbf525
commit
8a272b6410
4 changed files with 87 additions and 13 deletions
23
README.md
23
README.md
|
@ -12,6 +12,29 @@ Secrets are stored in secrets/secrets.yaml. You can edit these secrets with `sop
|
|||
|
||||
To decrypt these secrets with sops-nix during a rebuild, you must add your host public key to the `.sops.yaml` file. Generate it with `cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age`, add it to the file, then run `sops updatekeys secrets/secrets.yaml`.
|
||||
|
||||
# Provisioning A New Machine
|
||||
|
||||
On the target system, boot into the NixOS installer and run:
|
||||
|
||||
```bash
|
||||
# Create a password for the nixos user for SSH access.
|
||||
passwd
|
||||
|
||||
# Start wpa_supplicant and connect to a wifi network.
|
||||
sudo systemctl start wpa_supplicant
|
||||
wpa_cli
|
||||
> add_network
|
||||
> set_network 0 ssid "SSID"
|
||||
> set_network 0 psk "password"
|
||||
> enable_network 0
|
||||
> quit
|
||||
|
||||
# Get the IP address of the target system.
|
||||
ip addr
|
||||
```
|
||||
|
||||
On the host machine, run the command `deploy --flake .#<hostname> --target-host <username>@<ip_address>` to build the new system configuration and copy it over SSH along with the sops age key and ssh keys.
|
||||
|
||||
# Acknowledgements
|
||||
|
||||
- https://www.youtube.com/watch?v=CwfKlX3rA6E for piquing my interest in this OS in the first place
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue