Modular, flake-based NixOS configuration.
nixos-config/
├── flake.nix # entry point: nixpkgs + home-manager flake inputs
├── flake.lock # pinned inputs (committed)
├── hosts/
│ └── <host>/ # host composition
├── modules/
│ ├── nixos/ # system modules (base, boot, networking, ...)
│ │ └── services/ # optional services (audio, flatpak, snapshots, ...)
│ └── home-manager/ # Home Manager modules (shell, git, ...)
│ └── programs/
├── home/
│ └── <user>.nix # per-user Home Manager config + personal packages
├── pkgs/ # custom package derivations (placeholder)
├── overlays/ # overlays, wired via modules/nixos/base.nix
└── lib/ # shared helpers (placeholder)
Host composition lives in hosts/<host>/default.nix: imports are explicit, and
optional features are toggled either by (un)commenting an import (small features)
or via an enable option under the my.* namespace (reusable features, e.g.
my.desktop.enable = true;).
git pull --ff-only
sudo nixos-rebuild test --flake .#<host> # try without setting the boot generation
sudo nixos-rebuild switch --flake .#<host> # applyInputs are bumped automatically by system.autoUpgrade. To update them manually
(e.g., for local testing before committing):
nix flake update # all inputs — review flake.lock diff before rebuilding
nix flake update nixpkgs # single input- Base system runs on a stable nixpkgs; the desktop stack and user packages
track nixpkgs-unstable via the overlay in
overlays/default.nix. system.autoUpgradeis enabled: every machine pulls the latest commit onmaindaily and applies it, bumping all inputs to the latest of their branches (--override-flake --refresh) — fully autonomous/rolling. A failed build is safe; a broken-but-building change gets applied — roll back via a previous generation (gc keeps 7d). Tune inmodules/nixos/base.nix.hardware-configuration.nixis machine-local (/etc/nixos/, generated bynixos-generate-config), imported per host, and gitignored — not in this repo.- Validate with
nixos-rebuild testornix eval --impure; purenix flake checkcan't read that machine-local import. - Setup details:
docs/README.md.