feat: flake NixOS config for jupiter + VirtualBox test image
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# homelab
|
||||
|
||||
Flake-based NixOS config. Host: `jupiter` (ZimaBlade, NAS + services).
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
flake.nix # inputs + nixosConfigurations.jupiter
|
||||
jupiter/configuration.nix # system, users, ssh, samba, containers, caddy
|
||||
jupiter/hardware-configuration.nix # PLACEHOLDER — regenerate on real machine
|
||||
```
|
||||
|
||||
## First install (on the ZimaBlade)
|
||||
|
||||
1. Boot NixOS minimal ISO, partition + mount disks at `/mnt`.
|
||||
2. Generate hardware config:
|
||||
```
|
||||
sudo nixos-generate-config --root /mnt
|
||||
```
|
||||
Copy `/mnt/etc/nixos/hardware-configuration.nix` into `jupiter/`.
|
||||
3. Add your SSH public key to `users.users.erik.openssh.authorizedKeys.keys`.
|
||||
4. Install:
|
||||
```
|
||||
sudo nixos-install --flake .#jupiter
|
||||
```
|
||||
|
||||
## Rebuild after changes
|
||||
|
||||
```
|
||||
sudo nixos-rebuild switch --flake .#jupiter
|
||||
```
|
||||
|
||||
Remote from laptop:
|
||||
```
|
||||
nixos-rebuild switch --flake .#jupiter \
|
||||
--target-host erik@jupiter --use-remote-sudo
|
||||
```
|
||||
|
||||
## Adding a service
|
||||
|
||||
Copy the `whoami` block in `oci-containers.containers`, swap image/ports/volumes.
|
||||
Native NixOS module exists for many apps (Nextcloud, Jellyfin, Grafana...) —
|
||||
prefer `services.<app>` over a container when available.
|
||||
|
||||
## Notes
|
||||
|
||||
- Backend is Podman with `dockerCompat` — `docker` CLI works, no daemon.
|
||||
- Set correct `time.timeZone` and Samba `path` for your data mount.
|
||||
- `system.stateVersion` = `26.05`, install-time schema. Do NOT bump on upgrades.
|
||||
```
|
||||
Reference in New Issue
Block a user