Dendritic-style flake configuration using import-tree and flake-parts for automatic module discovery.
flake.nix # Entry point - delegates to import-tree
|-- modules/
|-- flake-parts/ # Infrastructure (host loader, overlays, meta)
|-- hosts/ # Per-machine definitions -> nixosConfigurations
|-- applications/ # Browser, productivity, gaming apps
|-- desktop/ # Hyprland, GNOME, audio, theming
|-- development/ # Languages, editors, AI tools
|-- shell/ # Fish, bash, CLI utilities
|-- system/ # Core system config
|-- users/fbb/ # User-specific NixOS + Home Manager
|-- *.nix # Single-purpose modules
|-- pkgs/by-name/ # Custom packages
Each file exports under flake.modules.nixos.* or flake.modules.homeManager.*.
Host definitions list module names; the loader in modules/flake-parts/hosts.nix assembles configurations and wires Home Manager automatically.
Run linting checks on all Nix files:
nix run '.#lint' # Check code quality
nix run '.#fmt' # Auto-format codeTools used:
- statix: Catches anti-patterns and common mistakes
- deadnix: Detects unused code
- nixpkgs-fmt: Formats Nix files
Automatic linting on every commit. Setup (one-time):
nix developThis installs git hooks that run the linter before each commit.
The dotfiles.nix module clones fbosch/dotfiles and applies it via GNU Stow:
This allows for more flexibility when configuring and using shared configs in non-nix environments.
# modules/dotfiles.nix
home.activation.stowDotFiles = ...
stow --restow -t "$HOME" .- MrSom3body/dotfiles - NixOS configuration reference
- drupol/infra - Infrastructure configuration reference