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

error: flake 'git+file:///<flake_path>' does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux' #464

Closed
mrdev023 opened this issue Feb 7, 2025 · 6 comments · Fixed by #465

Comments

@mrdev023
Copy link

mrdev023 commented Feb 7, 2025

When i use

nix run github:nix-community/nixos-anywhere -- --flake '.#nixos-labo-pc-1' --vm-test

I get this error

error: flake 'git+file:///<flake_path>' does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'

Broken at commit id : af5999e
Work on official tag 1.6 : 97b45ac

EDIT:

This commit 90a51e8 seem to be broken because with this b5cc26d it works well

@arunoruto
Copy link

arunoruto commented Feb 7, 2025

I was about to test nixos-anywhere after a long time again, and got the same error...
I reverted to using the package from nixpkgs.
The only thing you need to take care of is to put the ssh username@host part at the end of the config, and remove the --target-host option (it was added in a newer version than on stable).

export SSHPASS=supersecretpassword
nix shell nixpkgs#nixos-anywhere
nixos-anywhere --env-password --flake .#config username@host

@boymaas
Copy link

boymaas commented Feb 7, 2025

Ran into the same issue. This worked for me:

nix run github:nix-community/nixos-anywhere/b5cc26d -- --build-on remote --debug --flake .#... --target-host ...

@dasJ
Copy link
Member

dasJ commented Feb 8, 2025

#456 (comment)

@dasJ
Copy link
Member

dasJ commented Feb 8, 2025

Can someone test nix run github:dasJ/nixos-anywhere/33f178376ff52a09638298a734ffdf9c39d6b748 which tests #465?

@cryptoluks
Copy link

Can someone test nix run github:dasJ/nixos-anywhere/33f178376ff52a09638298a734ffdf9c39d6b748 which tests #465?

On my Darwin machine, I initially encountered the following error when trying to use nixos-anywhere on an x86 Linux target:

error: flake 'git+file:///Users/SNIP/.config/nix' does not provide attribute 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'

However, it now seems to work with:

nix run github:dasJ/nixos-anywhere/33f178376ff52a09638298a734ffdf9c39d6b748 -- --flake '.#SNIP' --phases kexec,disko,install --build-on remote root@SNIP -p 22

Thank you, @dasJ! 👍

@Mic92
Copy link
Member

Mic92 commented Feb 8, 2025

Fixed in #465

@Mic92 Mic92 closed this as completed Feb 8, 2025
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.

6 participants