-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
nix-env-selector does not work with flakes #87
Comments
Same here |
Any progress? |
Use direnv vscode extension instead :3 works for me |
Would greatly appreciate if this project could be extended to support flakes as well. Flakes have done a great job at increasing Nix's accessibility! Would like to avoid adding another tool to the mix to setup vscode. |
What works for me: Or I create a And then just use the shell.nix as normal with the vscode extention. |
My approach has been to use flake-compat
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; }
).shellNix |
@nyabinary |
I gave a shot at the @HendrikHuebner here is how I managed. Content of #!/bin/sh
#If already set (e.g. in github actions); use that instead
if [ -z "$GITHUB_TOKEN" ]; then
nix run nixpkgs#gh auth status || nix run nixpkgs#gh auth login
GITHUB_TOKEN="$(nix run nixpkgs#gh auth token)"
export GITHUB_TOKEN
fi
NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN"
export NIX_CONFIG
use flake Because my flake use private repo. If you have a basic flake, you can simply use use flake |
Describe the bug
This bug manifests with similar symptoms as in #56... specifically stuck in the "Applying environment..." state, but AFAICT has a different root cause and I am therefore opening a separate issue.
When selecting a
flake.nix
from the nix-env-selector drop-down, the erroris shown in the developer console, and the tray icon stays in the "Applying environment..." spinner forever.
To Reproduce
Steps to reproduce the behavior:
Nix-Env: Select environment...
and selectflake.nix
from the drop down.Expected behavior
The environment equivalent to
nix develop
to be applied.Screenshots
n/a
Environment:
Additional context
n/a
The text was updated successfully, but these errors were encountered: