File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ nix develop
2020
2121# Validate flake
2222nix flake check
23+
24+ # Scaffold a new project from template
25+ flake-init # uses "minimal" template
26+ flake-init < template> # uses a specific template
2327```
2428
2529## Commit Convention
@@ -57,6 +61,8 @@ common/
5761 ghostty/ # Ghostty terminal (macOS only — guarded with mkIf)
5862 lazygit/ # Cross-platform via xdg.configFile
5963 profiles/ # Optional opt-in modules
64+ templates/
65+ minimal/ # Default flake template (devShell, direnv, pre-commit)
6066systems/
6167 aarch64-darwin/ # macOS: home.nix, homebrew/, defaults.nix, dock.nix
6268 aarch64-linux/default.nix # Linux: minimal HM config for containers
Original file line number Diff line number Diff line change @@ -44,8 +44,28 @@ hmswitch # Apply Home Manager config (Linux)
4444nix develop # Dev shell with nixfmt, statix, deadnix, nil
4545nix flake check # Validate configuration
4646nixswitch --show-trace # Debug build failures
47+ flake-init # Scaffold new project (defaults to minimal template)
48+ flake-init < template> # Scaffold with a specific template
4749```
4850
51+ ### flake-init
52+
53+ Scaffolds a new project directory using Nix flake templates stored in this repo. Uses ` nix flake init ` under the hood.
54+
55+ ``` bash
56+ cd ~ /Projects/new-thing
57+ flake-init # creates flake.nix, .envrc, .gitignore, .pre-commit-config.yaml
58+ direnv allow # activate the devShell
59+ ```
60+
61+ ** Available templates:**
62+
63+ | Template | Description |
64+ | ----------| -------------|
65+ | ` minimal ` (default) | devShell with pre-commit, direnv, gitignore |
66+
67+ Templates live in ` templates/ ` and are registered as flake outputs.
68+
4969## Structure
5070
5171```
You can’t perform that action at this time.
0 commit comments