No description https://yhkze.net/nixos
  • JavaScript 58.4%
  • HTML 23.4%
  • Nix 12.3%
  • CSS 3.1%
  • Go 1%
  • Other 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
yuuhikaze 88349fc52f fix(network): restore desktop user ssh key, drop host key from users.nix
56ee126 replaced desktop.ssh.pubkey with the sshd host key (…JjRuuMS),
so users.nix authorized the desktop's machine identity instead of its
client key
2026-11-21 14:32:08 -05:00
.tern docs: canonical URL and link previews for the published docs 2026-11-05 15:42:23 -05:00
docs feat(neovim): consume nvim flake module, declare languages per host 2026-11-19 00:01:31 -05:00
docs-html docs(open-webui): document context compaction and upgrade backups 2026-11-18 12:49:14 -05:00
hosts fix(desktop): fetch hytale launcher icon from its moved url 2026-11-21 08:40:40 -05:00
modules/features fix(flatpak): add flathub remote once network is online 2026-11-20 20:52:09 -05:00
resources feat(keycloak): riso zine login theme with adaptive wallpapers 2026-11-15 01:29:35 -05:00
scripts feat(invidious): add home line to companion egress pool 2026-11-16 10:47:08 -05:00
talos-config feat(talos): mirror docker.io and ghcr.io through server caches 2026-10-24 15:13:31 +00:00
tofu/keycloak feat(keycloak): add dongba maintainer and viewer groups 2026-11-16 04:13:07 -05:00
values fix(network): restore desktop user ssh key, drop host key from users.nix 2026-11-21 14:32:08 -05:00
.gitignore chore(facter): track hardware dumps for every host 2026-11-16 05:16:29 -05:00
.pre-commit-config.yaml feat: add pre-commit hook with nixfmt auto-formatting 2026-07-08 09:44:13 -05:00
CLAUDE.md docs(claude): drop rule against committing facter reports 2026-11-21 00:11:01 -05:00
DIAGRAMS-C4.md docs: move DIAGRAMS-C4.md to the repo root 2026-11-01 12:44:33 -05:00
flake.lock chore(flake): bump kioku 2026-11-20 13:51:49 -05:00
flake.nix fix(flake): allow cuda packages by license via nixpkgs cuda predicate 2026-11-21 02:14:19 -05:00
FORGEJO.md docs: fix forgejo admin name, incus subnet and k8s bootstrap gaps 2026-11-15 13:51:05 -05:00
LICENSE chore: adds LICENSE 2025-10-06 19:14:33 -05:00
README.md docs(observability): document prometheus, thanos, opensearch, jaeger and perses stack 2026-11-15 18:21:24 -05:00

NixOS

This is the configuration that runs every machine I own — a server, two workstations, and a phone — all wired together over WireGuard and managed from a single Nix flake. Everything you see here, from the boot chain to the window manager to the file-sharing service that backs up my phone, is described declaratively in this repository.

The Fleet

Four hosts make up the network:

  • server (10.100.0.1): the always-on machine, hosting every self-hosted service plus the Incus and Kubernetes platforms
  • desktop (10.100.0.2): the home workstation, doubling as a GPU box for local LLM work
  • laptop (10.100.0.3): the same workstation experience, on the move
  • pixel7: a Pixel 7 running GrapheneOS built straight from this repo, with Syncthing keeping it in step with the server

The hosts form a peer-to-peer WireGuard mesh on 10.100.0.0/24, with the server acting as the relay hub for anything that doesn't have a direct path.

What Runs Where

On the server

  • Traefik as the front door, terminating TLS with a wildcard ACME certificate for *.yhkze.net
  • OpenCloud for file sync, paired with Collabora Online for in-browser editing
  • Keycloak providing single sign-on (OIDC, plus oauth2-proxy forward auth) and self-registration for product apps
  • A full mailserver — Postfix, Dovecot, OpenDKIM, SPF, DMARC — all declared in one module
  • A private F-Droid repo and a GrapheneOS OTA server for the phone
  • Incus clustered across all three hosts, with Ceph RBD as a shared storage pool so VMs can migrate between machines
  • A Kubernetes platform (Talos + Cilium + Longhorn + OpenBao + ArgoCD) running on VMs, with workloads exposed through the host's Traefik
  • An observability platform — Prometheus and Thanos for metrics, OpenSearch and Jaeger for logs and traces, OpenTelemetry collectors everywhere — with Perses dashboards generated from code and per-service access

On the workstations

A daily-driver Linux desktop, kept consistent between the desktop and the laptop:

  • Hyprland Wayland compositor, with Stylix providing system-wide theming derived from a single color scheme
  • A hybrid dotfiles approach — native home-manager where it fits, out-of-store symlinks for tools that bring their own DSL (e.g. Neovim)
  • A set of creative, gaming, and AI tooling shared between both hosts via values/packages/workstation.nix

On the phone

The Pixel 7 runs GrapheneOS built declaratively with robotnix, with the privileged F-Droid extension pointed at the private repo, SeedVault backups landing in OpenCloud over WebDAV, and OTA updates served from the server.

Foundations

Several design choices underpin the configuration:

  • Dendritic modules. Each feature lives in a single file under modules/features/, bundling its service configuration, packages, firewall rules, persistence declarations, SOPS secret bindings, and home-manager fragments. Modules are auto-imported, and host applicability is controlled through exclusion lists declared in flake.nix, so the modules themselves remain free of host-specific conditionals.
  • Impermanence. The root filesystem is a tmpfs that resets on every boot. Persistent paths must be declared explicitly, which keeps the set of stateful locations auditable at a glance.
  • Secure Boot. Lanzaboote and sbctl provide a verified boot chain on hosts that opt in through their feature list, with keys generated on first boot and stored on the persistent partition.
  • SOPS-nix. Each host carries its own age-encrypted secrets.yaml, decrypted at activation time and bound to systemd units via restartUnits for automatic reloads.
  • Unified rebuild workflow. A single Nushell script handles local rebuilds, remote rebuilds over SSH, and closure pushes from the current machine.

Repository Layout

flake.nix              host definitions and feature-exclusion lists
hosts/{host}/          entry point, packages, disko config, encrypted secrets
modules/features/      auto-imported, self-contained feature modules
values/                shared package sets, central network details
talos-config/          Talos machine configs and patches for k8s-master/k8s-worker
scripts/               nushell ops scripts (rebuild, impermanence rollback, ...)
docs/                  documentation source — start at docs/index.md
docs-html/             rendered docs (built by tern)

GitOps (separate repos):

git.yhkze.net/gitops/charts    Helm charts for K8s services (observability, ceph-csi-rbd, ...)
git.yhkze.net/gitops/apps      ArgoCD Application definitions

Documentation

Everything technical lives in docs/: the initial setup guide, the server reinstall and restore runbook, the Lanzaboote Secure Boot walkthrough, per-service deep-dives for the server, workstation tool notes, the GrapheneOS phone setup, and the Structurizr architecture diagrams.

Docs are written in Markdown under docs/ and rendered to docs-html/ with tern:

nix develop path:. --command tern

Browse it on: https://yhkze.net/nixos!

Deploying

If you'd like to try any of this on your own hardware, the install walkthrough — from BIOS prep through nixos-anywhere, LUKS bootstrap, and the first SOPS unlock — lives at docs/setup.md.

Once a host is up, day-to-day rebuilds go through a single script:

rebuild            # rebuild the current host
rebuild <ip>       # sync changes, then rebuild a remote host over SSH
rebuild push <ip>  # build locally and push the closure over SSH

Showcase