Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bag of Materials

An inventory of what this flake is made of, and where each piece lives.

Machines

Flake attributeHost configurationProxmox VMRuns
artifactshosts/artifacts/configuration.nixVM101 ArtifactsStoreRustFS, lakeFS, KohakuHub, Homepage
highperformancecomputinghosts/highperformancecomputing/configuration.nixVM100 HighPerformanceComputingSlurm, scientific toolchain, VS Code remote server

Both machines set networking.hostName = "nixos", so the flake attribute name identifies a host — not the hostname. That name is also what nixos-secrets/secrets/<name>/ is keyed by, which is why it matters.

Templates

TemplateUsed byPurpose
templates/artifacts.nixartifactsStorage workloads: RustFS, KohakuHub, Homepage, terminal
templates/highperformancecomputing.nixhighperformancecomputingSingle-node Slurm cluster, uv/Python toolchain

A template is the composition layer: it imports modules and sets the service-specific values for one class of machine.

Modules

ModuleProvides
modules/servers.nixServer base: SSH, NetBird, VS Code, common tooling
modules/common.nixPackages common to every host; pulls in SOPS and NetBird
modules/terminal-rice/terminal-rice.nixzsh, starship, tmux, fastfetch

Functions

FunctionProvides
functions/ssh.nixOpenSSH daemon, port 22
functions/netbird.nixNetBird VPN with setup-key login (exempt from session expiry), plus Docker DNS that bypasses its DNS listener
functions/netbird-session-expiration.nixClears the account’s 24h session-expiration flag on this host’s own NetBird peer, through the Management API
functions/sops.nixSOPS age key location and sops/age tooling
functions/rustfs.nixRustFS S3 storage, wired to its SOPS secrets
functions/docker_compose.nixDocker and Compose
functions/vscode_remote_server.nixprograms.nix-ld, needed for the VS Code Remote-SSH server
functions/ssh-uni.nixUniversity (NAIST) SSH access from a SOPS-managed key

Apps

AppProvides
apps/kohaku-hubKohakuHub plus its lakeFS / Postgres / Valkey Compose stack
apps/homepageHomepage dashboard
apps/bootstrap-auth.nixGitHub deploy key, SOPS age key (root copy for sops-nix, user copy for editing), the ~/nixos-secrets checkout, and NetBird membership via the shared setup key
apps/bootstrap-enroll.nixnix run .#enroll — hardware config, then bootstrap-auth

Playbooks