-
Notifications
You must be signed in to change notification settings - Fork 107
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
flake is not a recognized command #315
Comments
It looks like I can get around this by just calling |
I had the same issue yesterday after updating - resolved it by adding an overlay for Thats because NixOS/nixpkgs#126137 disabled flake support in |
In case anyone else needs it, this took a few minutes to remember:
NOTE: Make sure you've added the overlay to git |
This is fixed for me in, but perhaps this should be the default? |
Thank you both for report and solution.
It should, but unfortunately this would be harmful for older nixpkgs versions. I think there is no way around using Does the override function expose the original package functions args? Along those lines?
If you have an itch for a PR, please feel free to submit one to master. 😉 |
The issue re-appeared for me after today's lock update, even with above fix. |
I did update now as well and can confirm that with the current workaround and an updated Now |
I see. @Pacman99 Do we have "overlays" for home manager? I think the actual fix could be quite similar ... |
Could this error be related to the overlay issues fixed by #55? |
I mean any nixpkgs overlay for the host's channel will be applied for the nixpkgs passed to home-manager since it just inherits from the host.
|
I guess we need to conditionally enable |
This is still broken for me... I think. Maybe it's a separate problem but now I'm getting:
|
Did you ever find a fix for this? Stuck on the EXACT same problem right now! :( |
nix-direnv flakes support should be fixed, so I'm going to close this. The latest problem can be tracked in #406 |
Using the example in
I thought maybe my personal flake was the issue, but it's the same as the one in the |
Then after: @@ -1,9 +1,9 @@
{
programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
+ enableFlakes = true;
};
};
} I get:
It works fine after |
I notice that going back and forth between modified flake.lock
@@ -624,7 +624,10 @@
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
- "nixpkgs": "nixpkgs_3"
+ "nixpkgs": [
+ "digga",
+ "blank"
+ ]
},
"locked": {
"lastModified": 1637655461,
@@ -687,22 +690,6 @@
}
},
"nixpkgs_3": {
- "locked": {
- "lastModified": 1646955661,
- "narHash": "sha256-AYLta1PubJnrkv15+7G+6ErW5m9NcI9wSdJ+n7pKAe0=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "e9545762b032559c27d8ec9141ed63ceca1aa1ac",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixpkgs-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "nixpkgs_4": {
"locked": {
"lastModified": 1641016545,
"narHash": "sha256-JMNwvnBzG0RjGG3eH27Y5/GlJ9ryeCdGJfqGbqxnmZY=",
@@ -773,7 +760,7 @@
"pre-commit-hooks": {
"inputs": {
"flake-utils": "flake-utils_5",
- "nixpkgs": "nixpkgs_4"
+ "nixpkgs": "nixpkgs_3" Not sure if this matters, but seems weird. |
All of my issues were caused by a typo in: - bud.localFlakeClone = "/home/nixoss/system";
+ bud.localFlakeClone = "/home/nixos/system"; |
Apparently not, I use the system installed (from I have to use Maybe my install somehow got in s bad state? I'll create a VM from the Bud devos example and see if I can reproduce this issue later |
I'm also experiencing this issue. Maybe it's worth reopening? > readlink (which nix)
/nix/store/7gjn39gw0dli14vvwm7bqy99dljw3b2z-nix-2.7.0/bin/nix . Why is that not the one used to start the flake environment from direnv? Edit: All good now that I applied previously mentioned fix with |
Expected Behavior
Successful build following documentation
Current Behavior
Following documentation today, I get this result:
Possible Solution
I think either I met something up on my end or there was a update to flakes it broke things.
Steps to Reproduce
The above should work for this.
Context
I was trying to update to the latest devos and thought it was maybe a peculiarity of my set up. So I tried just following the guide to rule that out, and it appears there's some other issue.
Your Environment
✖130 ❯ nix-shell -p nix-info --run "nix-info -m"
"x86_64-linux"
Linux 5.12.9, NixOS, 21.11.20210610.432fc2d (Porcupine)
yes
yes
nix-env (Nix) 2.4pre20210601_5985b8b
""
/nix/store/v13yb14bkddyc1rxlrna5j3441pyh0r8-source
The text was updated successfully, but these errors were encountered: