Describe the bug
When I add inputs.devshell to my flake.nix and create the .envrc (containing use flake), but do not have a devshell.toml file, I will see an error:
$ direnv allow
direnv: loading .../.envrc
direnv: using flake
error: flake 'git+file:///...' does not provide attribute 'devShells.x86_64-linux.default', 'devShell.x86_64-linux', 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'
Did you mean devShells?
direnv: nix-direnv: Evaluating current devShell failed. Falling back to previous environment!
direnv: export +NIX_DIRENV_DID_FALLBACK ~PATH
This can be worked around by creating an empty devshell.toml file:
touch devshell.toml
direnv reload
Due to nix-direnv's caching, which is not aware of the presence of devshell.toml, this problem can be easily masked by a cached direnv still existing from a previous run when devshell.toml was present.
To Reproduce
Steps to reproduce the behavior:
flake.nix:
{
inputs = {
,,,
blueprint = {
url = "github:numtide/blueprint";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
};
,,,
}
.envrc
#!/usr/bin/env bash
# Used by https://direnv.net
# Load `nix develop`
use flake
# Extend the environment with per-user overrides
source_env_if_exists .envrc.local
Expected behavior
When devshell.toml is missing, blueprint + devshell behave as if the file was present but empty.
System information
NixOS 25.11 and unstable
Describe the bug
When I add
inputs.devshellto myflake.nixand create the.envrc(containinguse flake), but do not have adevshell.tomlfile, I will see an error:This can be worked around by creating an empty
devshell.tomlfile:Due to
nix-direnv's caching, which is not aware of the presence ofdevshell.toml, this problem can be easily masked by a cached direnv still existing from a previous run whendevshell.tomlwas present.To Reproduce
Steps to reproduce the behavior:
flake.nix:.envrcExpected behavior
When
devshell.tomlis missing,blueprint+devshellbehave as if the file was present but empty.System information
NixOS 25.11 and unstable