In geometry, the neusis (νεῦσις; from Ancient Greek νεύειν (neuein) 'incline towards'; plural: νεύσεις, neuseis) is a geometric construction method that was used in antiquity by Greek mathematicians. -- Wikipedia
Documentation: https://leoank.github.io/neusis/
Neusis is a flake-based configuration library for NixOS, nix-darwin and
home-manager, plus a CLI that scaffolds and grows a fleet repository on top
of it. You describe your machines, the people who log into them, and what
each person gets on each machine as typed data. Neusis builds the
nixosConfigurations, darwinConfigurations and homeConfigurations
from it.
neusisCLI: wizard-driven scaffolding.neusis initcreates a fleet repo, andneusis add machine | user | registry | secretsgrows it.- Library: the
flake.neusis.*schema, themkNeusisFlake/mkNeusisOS/mkNeusisDarwinOSbuilders, andflakeModulesto import them into any flake-parts flake. - Modules: opt-in home-manager modules (
supercharged-git,supercharged-shell,terminal-velocity,agent-harness, …), system modules that work on both NixOS and nix-darwin (tailscale,kanata,secrets, distributed builds, …) and config-only features.
curl -fsSL https://raw.githubusercontent.com/leoank/neusis/main/cli/install.sh | sh
# or: nix run github:leoank/neusis#neusis -- init my-fleet
neusis init my-fleet --darwin
cd my-fleet
neusis add machine laptop --system aarch64-darwin
neusis add user alice --full-name "Alice Example"
git add . && nix run .#write-flake && nix flake lock
sudo darwin-rebuild switch --flake .#laptopThe Quickstart guide walks through each step, including giving users a home-manager setup.
- Guide: installation, concepts, modules, secrets, using the library without the CLI
- CLI reference
flake.neusisschema and library functions- Home Manager modules and system modules, with every option
- Tutorials: supercharged-git, supercharged-shell, terminal-velocity, agent-harness, kalam
The reference is generated from this repository on every push to main.
The site's source lives on the gh-pages branch.
# a flake-parts module in your flake
{ inputs, ... }: {
imports = [ inputs.neusis.flakeModules.default ];
}See Using neusis without the CLI
and the consumer flakes in examples/.
This flake is also its author's fleet config, built with the same library
it exports. It follows the dendritic pattern: every file under modules/
is a flake-parts module, auto-imported with import-tree, and flake.nix
is generated by flake-file.
modules/: the library (lib/,agnosticModules/,homeModules/,features/, …) and the author's ownmachines/andusers/cli/: theneusisCLI (Go). Seecli/README.mdtemplates/:nix flake init -t github:leoank/neusis#<name>project templatesdocs/: tutorials and development notes (published on the site)old_modules/: the complete pre-refactor tree, kept verbatim (also taggedv1)
nix develop # dev shell
nix run .#write-flake && nix flake update <input> # after changing a flake-file.inputs declaration
cd cli && go test ./... # CLI tests
nix build .#darwinConfigurations.rogue.system # build-only check of a hostSee AGENTS.md for conventions and the verification ladder.