Skip to content
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

darwin-rebuild switch --flake is broken by new nix #307

Closed
ahmedelgabri opened this issue Mar 21, 2021 · 4 comments
Closed

darwin-rebuild switch --flake is broken by new nix #307

ahmedelgabri opened this issue Mar 21, 2021 · 4 comments

Comments

@ahmedelgabri
Copy link

ahmedelgabri commented Mar 21, 2021

This is what I get when I try to run darwin-rebuild switch --flake

$ darwin-rebuild switch --flake .
error: 'info' is not a recognised command
Try 'nix --help' for more information.

A quick investigation seems like it fails here on this line

flake=$(nix "${flakeFlags[@]}" flake info --json "${extraBuildFlags[@]}" "${extraLockFlags[@]}" -- "$flake" | jq -r .url)

$ nix flake info --json
error: 'info' is not a recognised command
Try 'nix --help' for more information.

This is an issue on nixpkgs that might be related NixOS/nixpkgs#116938

I think the command changed to nix flakes metadata instead. nix flakes --help & nix flakes metadata --help confirms this.

hardselius added a commit to hardselius/nix-darwin that referenced this issue Mar 21, 2021
Fixes "error: 'info' is not a recognised command'"

Issue: LnL7#307
@MattPColeman
Copy link

Have you found a workaround for this? Just ran into it on a new laptop, can't install my flake dotfiles 😭

@hardselius
Copy link
Contributor

@MattPColeman I have a fix pending merge. You can use my fork in the meantime.

@MattPColeman
Copy link

@MattPColeman I have a fix pending merge. You can use my fork in the meantime.

hero

theutz pushed a commit to theutz/nix-darwin that referenced this issue Apr 19, 2023
Fixes "error: 'info' is not a recognised command'"

Issue: LnL7#307
@Enzime
Copy link
Collaborator

Enzime commented Jul 15, 2023

Fixed by #308

@Enzime Enzime closed this as completed Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants