-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
[BUG] Can't deploy from aarch64-darwin to x86_64-linux #1644
Comments
Additionally, same error happens when deploying with plain
|
Just to confirm: removing nixvim from your config resolves the issue? I have a feeling this is related to how flakes have one "system" variable, while nixpkgs actually needs a distinct host and target system. See https://nix.dev/tutorials/cross-compilation.html and https://nixos.wiki/wiki/Cross_Compiling Flakes usually just assume system is the same for both host & target. |
Yes, removing nixvim from the config resolves the issue: Without nixvim:
With nixvim:
|
The way I found around this was to specify builders in the deploying machine's My $ cat /etc/nix/machines
ssh://root@my-arm-machine aarch64-linux /Users/james/.ssh/my-privkey 4 1 benchmark,big-parallel,gccarch-armv8-a,kvm,nixos-test
ssh://root@my-intel-machine x86_64-linux /Users/james/.ssh/my-privkey 4 1 benchmark,big-parallel,kvm,nixos-test I am unsure which of the features I'm actually using, so I just stuck them all in there. One thing that caught me out was that all the ssh config is from I won't pretend to know enough about nix to understand why this happens, and I would love to find out why if anyone can enlighten me! |
I came up with a simple workaround. This shell script runs #!/usr/bin/env zsh
nix flake update
rsync -q -avx --delete ./ $1:/etc/nixos/
ssh -t $1 'cd /etc/nixos && sudo nixos-rebuild switch --impure --upgrade --flake .\?submodules=1#$1' While not a solution to the failing check, this lets me deploy NixOS configurations to my target machines until the issue is fully resolved |
Thank you @notthebee for sharing this workaround. |
@GaetanLepage as I mentioned above, the flake can be deployed with no issues after I remove Nixvim from my configuration. |
Does this commit help at all?
EDIT: I think that line was a red-herring, the pkgs used there should be the pkgs from the host module system. |
Unfortunately it doesn't
|
N/A
24.05
24.05
Description
Trying to deploy a flake which includex nix-community/nixvim from an M1 Mac to an x86-64 NixOS machine using
deploy-rs
produces the following error:#1637 seemed to fix a similar error in the file
nixpkgs-nixvim-doc.drv
, but the issue withinit.lua.drv
remains.It seems to be related to the IFDs mentioned in this issue: #1154
Minimal, Reproducible Example (MRE)
nix flake update
deploy-rs
, for instance:The text was updated successfully, but these errors were encountered: