Rolling-release-style NixOS + home-manager configurations, organized as a
single Nix flake. Each host is one folder; shared behavior lives in
modules/, per-user config in users/ and home/.
# Build/switch a host defined in this flake
nixos-rebuild switch --use-remote-sudo --flake .#<host>
# Build without switching (test the build)
nixos-rebuild build --flake .#<host>
# Rebuild home-manager standalone (jeromeb)
home-manager switch --flake .#jeromebHost names come from modules/hosts/* (each folder declares itself as a
nixosConfiguration via its flake-parts.nix). See HOSTS.md for
the host map.
| Path | Purpose |
|---|---|
flake.nix |
Inputs; the dendritic preset auto-imports modules/ (see ADR 0014). |
modules/hosts/ |
Host folders (each folder = one nixosConfiguration). |
modules/nix/ |
flake-parts plumbing: nixosConfigurations, homeConfigurations, packages/checks/devShells, input manifest. |
modules/ |
Feature modules (services, hardening, networking, ...). Plain (pre-conversion) NixOS modules carry a _ prefix: they are parked out of the auto-imported flake-parts tree while keeping relative imports intact. |
desktop-environments/ |
Reusable DE profiles (xfce, kde, mate, ...). |
users/ |
System user definitions. |
home/ |
home-manager configuration for jeromeb. |
modules/global/_constants.nix |
Cross-host constants (domain, nebula CIDR, build hosts). |
secrets/ |
sops-encrypted secrets + committed public keys. |
scripts/ |
Host/service key + secret helper scripts. |
docs/ |
Repo documentation (see docs/README.md). |
Justfile |
Convenience recipes (just). |
just snano <path> # sops edit a secret
just py3 scripts/... # run a Python helper with pyyaml
just sops-refresh # refresh sops metadata
just rebuild <host> # nixos-rebuild switch --use-remote-sudo --flake .#<host>
just build <host> # build without activating
just check # evaluate every native host (no build); catches broken imports/options
just fmt # format all tracked .nix files (nixfmt)
just fmt-check # report formatting diffs without writingjust check is the fast eval gate; the flake also exposes per-host eval
checks at checks.x86_64-linux.<host> (build e.g.
nix build .#checks.x86_64-linux.zurg) plus checks.x86_64-linux.upgrade-health.
Formatting and checks are provided through flake-parts:
nixosConfigurations/homeConfigurations live under flake, while
packages/checks/devShells/formatter are perSystem.
Secrets, host identity keys, and rotation are documented in docs/secrets-101.md.
-
Create
modules/hosts/<name>/with a_default.nix(and a_hardware-configuration.nix). -
Import shared modules you need (
../../../modules/_common, DE profile, ...). -
Set
networking.hostNameandsystem.stateVersion. -
Declare the host:
modules/hosts/<name>/flake-parts.nixwith{ self, ... }: { flake.nixosConfigurations."<name>" = self.lib.mkNixos "x86_64-linux" "<name>"; }
Afterwards convert the folder to the dendritic layout: rename the module to
default.nix, defineflake.modules.nixos.<name> = { imports = [ ... ]; }and drop the relative imports of parked modules as they get converted. -
Add the host to HOSTS.md.
flake.nix imports every modules/hosts/<name>/flake-parts.nix it finds; a
folder without one is a loud eval error, not a silently skipped host — no
flake.nix edit needed.
All inputs follow nixpkgs where possible (inputs.<name>.follows = "nixpkgs")
so the closure resolves against a single nixpkgs revision, pinned in
flake.lock. Bump with:
nix flake update # all inputs
nix flake update <input> # one inputSee docs/README.md for references, including
nix-book, nix.dev, and the NixOS/Nixpkgs
manuals.