Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm authored Jul 11, 2024
1 parent 37c6c14 commit caaf63c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Shell scripts are built from the flake at <https://github.com/joinemm/bin>
- `apollo` - Syncthing central sync node and cloud server for web services
- `archimedes` - Raspberry Pi 4B, local homelab for local services such as DNS

## Installation
## Installing a configuration

For a given `host`
Assuming NixOS is already running, a config can be switched to:

```sh
nixos-rebuild switch --flake .#$HOST
Expand All @@ -33,6 +33,14 @@ The included script will install the system, and add `ssh_host_ed25519_key` spec
./scripts/install .#$HOST $REMOTE_IP --secrets hosts/$HOST/secrets.yaml
```

To update the remote server after changes, run `nixos-rebuild` with remote target:

```sh
nixos-rebuild switch --flake .#$HOST --target-host $REMOTE_IP --use-remote-sudo
```

Add `--fast` if the target system architecture does not match yours (e.g. it's `aarch64` system)

## SD card images

The raspberry pi config can be built as flashable sd card image for initial installation:
Expand All @@ -43,7 +51,8 @@ nix build .#nixosConfigurations.archimedes.config.system.build.sdImage
# check sd card device
lsblk
# flash to sd card
sudo dd if=result/nixos-sd-image-xxx-aarch64-linux.img of=/dev/sda bs=4M conv=fsync status=progress
cd result/sd-image
sudo dd if=nixos-sd-image-xxx-aarch64-linux.img of=/dev/sda bs=4M conv=fsync status=progress
```

This sd card can now be inserted into a raspberry pi and it will boot the configuration.

0 comments on commit caaf63c

Please sign in to comment.