- Use `flake-parts` to split a large `flake.nix` into composable modules — define each concern (packages, devShells, NixOS configurations) in a separate `mkFlakeModule` file.
- Expose packages under `packages.${system}.default` and dev shells under `devShells.${system}.default` to conform to standard flake output conventions.
- Use `eachDefaultSystem` from `flake-utils` or `perSystem` from `flake-parts` to avoid repeating system-specific output definitions for every supported platform.
- Place NixOS configurations in `nixosConfigurations.<hostname>` and Home Manager configurations in `homeConfigurations.<user>` at the flake top level for discoverability.