Repository navigation
devenv #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
devenv #369
Changes from 13 commits
2947060
1f7dd33
e330861
2af265d
b69008c
ad87e69
5026a98
f139a19
ac9cdcf
52bae23
09fcbb2
8e49fdb
45df727
e1d33b2
0678a07
25f4b30
e20f3f3
3be37d4
4009ba2
52cf65a
4bad055
d5eb25d
07930dc
cf7638b
37c2738
eb937ae
2f74fce
a26d4bf
939ffda
30dff45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| # AI | ||
| .claude | ||
| .devenv.nix | ||
|
|
||
| # Nix | ||
| .devenv | ||
| *.hm-backup | ||
|
|
||
| # General | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,6 +25,11 @@ DOCKER_IMAGE_TAGGED := $(DOCKER_IMAGE_NAME_BASE):$(GIT_COMMIT_SHA) | |||||
| # Nix executable path | ||||||
| NIX_EXEC := $(shell which nix) | ||||||
|
|
||||||
| # Common cache settings (apply even before switch) | ||||||
| NIX_SUBSTITUTERS := https://cache.nixos.org https://devenv.cachix.org https://cachix.cachix.org | ||||||
| NIX_TRUSTED_KEYS := cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM= | ||||||
| NIX_CACHIX_CONF := /etc/nix/cachix.conf | ||||||
|
||||||
| NIX_CACHIX_CONF := /etc/nix/cachix.conf |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --no-pure-eval flag disables purity checks during Nix evaluation, which can lead to non-reproducible builds. This flag should generally be avoided unless there's a specific requirement for impure evaluation (e.g., accessing environment variables during build). Consider removing this flag to maintain build reproducibility, or document why it's necessary if it's required for devenv functionality.
| NIX_FLAGS := --extra-experimental-features 'flakes nix-command' --no-pure-eval | |
| NIX_FLAGS := --extra-experimental-features 'flakes nix-command' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --no-pure-eval flag is added globally to NIX_FLAGS, which disables purity checks in Nix evaluation. This could mask issues and goes against Nix's core principles.
What specific devenv requirement necessitates this flag? Consider scoping it only to devenv-specific targets (like devenv-cli) rather than applying it globally to all Nix operations including nix-build and nix-switch.
Agent: 🏛 Architecture
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unsupported --no-pure-eval Nix flag
All Nix invocations now include --no-pure-eval via NIX_FLAGS, but the Nix CLI only supports toggling evaluation purity with --impure/--pure (see nix build --help), and there is no --no-pure-eval switch. With the current Makefile, every target that calls nix will fail immediately with “unrecognized flag ‘--no-pure-eval’,” so builds and dev-shell entry will break until the flag is removed or replaced with a supported option.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nix-configure-cachix target implements imperative system configuration that conflicts with the declarative Nix approach used elsewhere. This creates architectural boundary violations:
- Build tooling contains infrastructure state (cache URLs, keys)
- System modifications are hidden in build targets
- Configuration can drift between Makefile-managed and Nix-managed state
- Users who run
nix developdirectly bypass this setup
For NixOS and nix-darwin systems, this should be unnecessary since cache configuration is already declarative in Nix files. This target should only be needed for non-NixOS Linux bootstrap scenarios.
Consider:
- Documenting this as a bootstrap helper only
- Detecting if running on NixOS/nix-darwin and skipping the imperative config
- Moving cache configuration constants to the proposed centralized
lib/cachix-config.nix
Agent: 🏛 Architecture
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding trusted-users = root $(NIX_USERNAME) gives the current user elevated privileges in Nix, allowing them to build unsigned derivations and override sandbox settings. While this may be necessary for development, consider documenting this security implication. Users added to trusted-users effectively have root-equivalent privileges for Nix operations.
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The -L flag added here enables logging of build output, which is helpful for debugging. For consistency, consider adding this flag to other nix build commands throughout the file (e.g., lines 248, 250, 252, 266) where --show-trace is already used, or document why it's only needed for Darwin builds.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { pkgs }: | ||
|
|
||
| { | ||
| packages = [ | ||
| pkgs.nodejs | ||
| pkgs.bun | ||
| pkgs.neovim | ||
| ]; | ||
|
|
||
| enterShell = '' | ||
| echo "Dev shell ready: Node.js, bun, and Neovim available." | ||
| ''; | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding inline comments explaining why these specific cachix substituters (devenv.cachix.org and cachix.cachix.org) are required, especially since this is a new addition. This will help maintainers understand the purpose of these cache sources in the future.