Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5f18199
chore: make a match-dirent utility
designbyajay Jan 22, 2026
4497f68
chore: decouple stubProject.nix
designbyajay Jan 22, 2026
b445535
chore: refactor importFromLanguageFolder.nix
designbyajay Jan 22, 2026
9d1d26f
chore: rename .config/stubProject.nix
designbyajay Jan 22, 2026
fb2253b
chore: load stub projects from .config/ directory
designbyajay Jan 22, 2026
66b4a8b
chore: update gitignore
designbyajay Jan 22, 2026
5df779f
chore: do not stub .envrc when stubbing projects
designbyajay Jan 23, 2026
b15b387
chore: stub nested projects
designbyajay Feb 22, 2026
35975a8
chore: include tool version in stub project nix
designbyajay Jan 24, 2026
f1a2085
chore: decouple stub-project-nix_v2.33.1.nix
designbyajay Jan 24, 2026
12d40e1
chore: update .gitignore
designbyajay Jan 23, 2026
d467fe6
chore: make tool-<name>_<version>.nix
designbyajay Jan 24, 2026
393f123
chore: make tool.nix
designbyajay Jan 24, 2026
d2fc594
chore: make parse-manifest-flake_nix.nix
designbyajay Jan 23, 2026
3138674
chore: make dev-shell.nix
designbyajay Jan 24, 2026
8acd39c
chore: make installGitHooks.nix use dev-shell.nix
designbyajay Feb 4, 2026
5d22a61
chore: snake case dev shell nix files
designbyajay Feb 4, 2026
8b3f8de
chore: update .gitignore
designbyajay Feb 4, 2026
af3e909
chore: rename lintCommit.nix commitlintConfig.nix
designbyajay Feb 21, 2026
572fdc9
chore: update .gitignore
designbyajay Feb 21, 2026
e4bddca
chore: update flake.nix to use dev-shell.nix
designbyajay Feb 21, 2026
eadeda8
chore: update .gitignore
designbyajay Feb 21, 2026
1ef0ada
chore: make config-vscode-<tool>.nix
designbyajay Feb 21, 2026
b5c89b6
chore: make config-zed-<tool>.nix
designbyajay Feb 21, 2026
648dbb8
chore: delete language-nix folder
designbyajay Feb 21, 2026
51e34e0
chore: update .gitignore
designbyajay Feb 21, 2026
4bfe8a8
chore: update documentation
designbyajay Feb 22, 2026
10a2258
chore: project-lint-semver output jsonl of semvers
designbyajay Feb 26, 2026
aebc267
chore: remove recurse.nix
designbyajay Feb 23, 2026
aeac3c9
chore: update .gitignore
designbyajay Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .config/.envrc

This file was deleted.

27 changes: 14 additions & 13 deletions .config/.gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
*
!language-nix
!.envrc
!.gitignore
!commitlintConfig.nix
!configVscode.nix
!importFromLanguageFolder.nix
!configZed.nix
!devShell.nix
!sanitizeProjectName.nix
!stubProject.nix
!commitlint-config.nix
!config-vscode.nix
!config-vscode-nix.nix
!config-zed.nix
!config-zed-nix.nix
!dev-shell.nix
!CONTRIBUTE.md
!installGitHooks.nix
!lintCommit.nix
!recurse.nix
!getSemverTag.nix
!install-git-hooks.nix
!lint-commit.nix
!parse-manifest-flake_nix.nix
!match-dirent.nix
!stub-project.nix
!stub-project-nix_v2.33.1.nix
!tool.nix
!tool-nix_v2.33.1.nix
38 changes: 5 additions & 33 deletions .config/CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,9 @@
The .config folder contains all of the code needed to support projects of various languages
The .config folder contains all of the code needed to run commands defined in manifest files, such as `package.json`, `go.mod`, `cargo.toml`, `flake.nix`

In this monorepo, we assume that each project is written in ONE language.
To add support for a manifest file, see [dev-shell.nix](./dev-shell.nix) line ~332

To add support for projects in a new language, create a `language-*/` folder containing:
commands use specific versions of dev tools: e.g. nix 2.33.1, go 1.26, etc.

```
language-go/
|
|-- .envrc # direnv integration: use flake ../../#go
|
|-- .gitignore # exclude everything except .nix files
|
|-- devShell.nix # project-lint, project-build, project-test commands
|
|-- configVscode.nix # LSP, formatter, extension settings for VSCode
|
|-- configZed.nix # LSP, formatter, extension settings for Zed
|
|-- stubProject.nix # script to scaffold new projects
|
'-- templateProject/ # files copied by stubProject.nix
```
To register a tool version, see [tool.nix](./tool.nix) line ~153

Each nix expression points editors to nix-installed dev tools rather than
system-installed ones, ensuring consistent tooling across machines.

**Reference Documentation:**

| File | Documentation | Example |
| ------------------ | ------------------------------------------------------ | -------------------------------------------------------------- |
| `.envrc` | use `flake ../../#nix` | [language-nix/.envrc](language-nix/.envrc) |
| `.gitignore` | exclude all except `.nix` files | [language-nix/.gitignore](language-nix/.gitignore) |
| `devShell.nix` | see [devShell.nix](devShell.nix) lines 617-722 | [language-nix/devShell.nix](language-nix/devShell.nix) |
| `configVscode.nix` | see [configVscode.nix](configVscode.nix) lines 119-189 | [language-nix/configVscode.nix](language-nix/configVscode.nix) |
| `configZed.nix` | see [configZed.nix](configZed.nix) lines 146-213 | [language-nix/configZed.nix](language-nix/configZed.nix) |
| `stubProject.nix` | see [stubProject.nix](stubProject.nix) | [language-nix/stubProject.nix](language-nix/stubProject.nix) |
The config folder also contains commands to stub new projects. To add support for stubbing a new project, see [stub-project.nix](./stub-project.nix) line ~214
File renamed without changes.
File renamed without changes.
21 changes: 14 additions & 7 deletions .config/configVscode.nix → .config/config-vscode.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
pkgs ? import <nixpkgs> {},
vscodeConfigs ? (import ./importFromLanguageFolder.nix {inherit pkgs;}).importConfigVscode,
vscodeConfigs ?
map (configVscodeDirent: (import ./${configVscodeDirent.name} {inherit pkgs;})) (
import ./match-dirent.nix {
pkgs = pkgs;
from = ./.;
matchDirentName = name: (builtins.match "^config-vscode-.*\.nix$" name) != null;
matchDirentType = type: (builtins.match "^regular$" type) != null;
}
),
}: let
validVscodeConfigs = builtins.map (vsc:
if
Expand Down Expand Up @@ -83,10 +91,9 @@
};
in
project-install-vscode-configuration
# HOW TO SET UP A LANGUAGE-SPECIFIC VSCODE CONFIGURATION
# HOW TO SET UP A TOOL-SPECIFIC VSCODE CONFIGURATION
#
# Each language-specific folder contains a configVscode.nix. This
# nix file must contain the following nix expression:
# create a config-vscode-<name-of-tool>.nix in this directory, with the following:
#
# { pkgs ? import <nixpkgs> {} }: {
# vscodeSettings = {
Expand Down Expand Up @@ -120,11 +127,11 @@ in
# };
# }
#
# this configVscode.nix merges the contents of all language-specific configVscode.nix:
# this config-vscode.nix merges the contents of all config-vscode-<tool>.nix:
#
# ________________________ ________________________
# / .vscode/ | / language-* |
# / settings.json | / configVscode.nix |
# / .vscode/ | / config-vscode- |
# / settings.json | / <tool>.nix |
# | ----------------------- | | ----------------------- |
# | { | | vscodeSettings = { |
# | "nix.enable": true,<---- merged ------ "nix.enable" = true; |
Expand Down
File renamed without changes.
16 changes: 12 additions & 4 deletions .config/configZed.nix → .config/config-zed.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
pkgs ? import <nixpkgs> {},
zedConfigs ? (import ./importFromLanguageFolder.nix {inherit pkgs;}).importConfigZed,
zedConfigs ?
map (configZedDirent: (import ./${configZedDirent.name} {inherit pkgs;})) (
import ./match-dirent.nix {
pkgs = pkgs;
from = ./.;
matchDirentName = name: (builtins.match "^config-zed-.*\.nix$" name) != null;
matchDirentType = type: (builtins.match "^regular$" type) != null;
}
),
}: let
validZedConfigs = builtins.map (zc:
if (builtins.isAttrs zc) && (builtins.hasAttr "zedSettings" zc) && (builtins.hasAttr "zedDebug" zc)
Expand Down Expand Up @@ -112,9 +120,9 @@
};
in
project-install-zed-configuration
# HOW TO SET UP A LANGUAGE-SPECIFIC ZED CONFIGURATION
# HOW TO SET UP A TOOL-SPECIFIC ZED CONFIGURATION
#
# Each language-specific folder contains a configZed.nix. This
# create a config-zed-<name-of-tool>.nix in the current directory. This
# nix file must contain the following nix expression:
#
# { pkgs ? import <nixpkgs> {} }: {
Expand Down Expand Up @@ -149,7 +157,7 @@ in
# }; # use {} if no debugger for language
# }
#
# this configZed.nix merges the contents of all language-specific configZed.nix:
# this config-zed.nix merges the contents of all config-zed-<tool>.nix:
#
# ________________________ ________________________
# / .zed/ | / language-* |
Expand Down
Loading
Loading