Add ruil and make liminal full-flake
This commit is contained in:
parent
97dceb1d65
commit
ff5367794d
16 changed files with 484 additions and 747 deletions
63
README.md
63
README.md
|
|
@ -1,3 +1,62 @@
|
|||
# Notes
|
||||
# NixOS Configurations
|
||||
|
||||
I generated the sops keys via `ssh <host> 'cat /etc/ssh/ssh_host_ed25519_key.pub'|nix run 'nixpkgs#ssh-to-age'`
|
||||
Flake-based NixOS configurations for zima, cryochamber, liminal, and ruil.
|
||||
|
||||
## Hosts
|
||||
|
||||
| Host | Description |
|
||||
|------|-------------|
|
||||
| zima | Local server (ZFS, impermanence) |
|
||||
| cryochamber | zfs.rent server (impermanence) |
|
||||
| liminal | Workstation (hardware-specific overlays) |
|
||||
| ruil | Digital Ocean droplet (ams3) |
|
||||
|
||||
## Deploying
|
||||
|
||||
After changing a host's config, deploy with:
|
||||
|
||||
```sh
|
||||
# Build and activate on the remote host
|
||||
just deploy ruil root@ruil.hunnur.com
|
||||
|
||||
# Or build and activate locally via sudo
|
||||
just deploy-sudo ruil
|
||||
```
|
||||
|
||||
There's also a shortcut:
|
||||
|
||||
```sh
|
||||
just deploy-ruil
|
||||
```
|
||||
|
||||
For local hosts, just run:
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch --flake .#zima
|
||||
```
|
||||
|
||||
## Secrets (sops-nix)
|
||||
|
||||
Secrets are managed with [sops-nix](https://github.com/Mic92/sops-nix) using age keys. Each host's secrets live in `hosts/<name>/secrets/config.yaml`.
|
||||
|
||||
Host age keys are derived from SSH host keys:
|
||||
|
||||
```sh
|
||||
ssh <host> 'cat /etc/ssh/ssh_host_ed25519_key.pub' | nix run 'nixpkgs#ssh-to-age'
|
||||
```
|
||||
|
||||
To edit a host's secrets:
|
||||
|
||||
```sh
|
||||
sops edit hosts/<name>/secrets/config.yaml
|
||||
```
|
||||
|
||||
## Available Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `just deploy <host> <target>` | Build remotely and activate |
|
||||
| `just deploy-sudo <host>` | Build locally and activate |
|
||||
| `just deploy-ruil` | Deploy ruil (shortcut) |
|
||||
| `just deploy-liminal` | Deploy liminal (shortcut) |
|
||||
| `just update` | Update flake lock file |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue