NixOS configuration for a headless dev/ops environment. It supports both the Intel NUC bare-metal host and a lower-cost NixOS-WSL trial host.
flake.nix— flake inputs and host outputshosts/kosmos/— bare-metal NixOS host for the Intel NUChosts/wsl/— NixOS-WSL host configmodules/common/— shared Nix, packages, locale, shell, and tool configmodules/nixos/— bare-metal boot, network, SSH, proxy, firewall, and containersmodules/wsl/— WSL-specific settingsmodules/users/— shared user definitionsttal/,einai/,temenos/— non-secret runtime config deployed by Home Managerscripts/sync-projects— clones or fetches repos listed inttal/projects.tomlpackages/tta-lab/— pinned release packages for tta-lab tools that are not in nixpkgsconfiguration.nix— compatibility entry point for thekosmoshostdisko-config.nix— declarative NVMe partition layout for bare-metal installinstall-guide.md— step-by-step install instructionswsl-guide.md— NixOS-WSL setup notesdocs/k3d-dev-cluster.html— Podman + k3d local cluster setup for WSL
# Syntax check (requires nix)
nix-instantiate --parse configuration.nix
# Build bare-metal host
nix flake check
nix build .#nixosConfigurations.kosmos.config.system.build.toplevel --no-link
# Build WSL host
nix build .#nixosConfigurations.wsl.config.system.build.toplevel --no-linkBoth hosts import modules/common/tunnel-rathole-client.nix, but the service is disabled by default. To enable it:
- Set the real VPS address in
client.remote_addr. - Change
services.rathole.enabletotrue. - Put service tokens in
/var/lib/secrets/rathole/client.toml, not in git.
The initial tunnel maps remote traffic to local SSH on 127.0.0.1:22. Add another service for Matrix/Tuwunel when needed.
The shared package set includes the mihomo CLI. The NixOS services.mihomo module is not enabled yet because the config file is secret-bearing and WSL should first use plain HTTP/SOCKS proxy mode, not TUN.
WSL installs OpenAI Codex CLI with npm instead of Nixpkgs because Codex releases often and Nixpkgs can lag. Apply the host, then run:
openai-codex-installThis installs @openai/codex@latest into ~/.local/share/npm-global/bin, which Fish adds to PATH.
The WSL host installs pinned release builds for flicknote and the GuionAI fork of taskwarrior. Frequently updated Go CLIs stay outside Nix for now and install from local checkouts into ~/go/bin:
tta-lab-go-installThis starts the tta-lab-go-install.service oneshot user unit. It first runs kosmos-sync-tta-lab-projects, then installs ttal, temenos, diary, organon, einai, and lenos from ~/code/projects/tta-lab.
The Home Manager user services temenos.service, einai.service, and ttal.service are defined in modules/common/tta-lab-go.nix. They only start after their binary exists in ~/go/bin.
On WSL, kosmos-wsl-proxy-env derives the Windows host IP from the default route and exports proxy variables when Clash/Mihomo is reachable on port 7897. Fish and the TTAL user services load it automatically.
Code lives under two roots:
~/code/projects/<org>/<repo>for repos we maintain or run from~/code/references/<org>/<repo>for external research clones
After applying the WSL host, clone or fetch the active project set from ttal/projects.toml:
kosmos-sync-projectsUse remote = "https://host/org/repo.git" in ttal/projects.toml when a repo is not on GitHub. Entries without remote default to https://github.com/<org>/<repo>.git.
To sync only the runtime repos needed by tta-lab-go-install:
kosmos-sync-tta-lab-projectsMIT