My flake contains NixOS configs for systems with x86_64-linux and aarch64-linux architecture.
Previously when it only contained x86_64-linux configs, running nix flake check
on GitHub actions worked perfectly well. Now that there are multiple architectures, I can’t run a full check without it complaining about needing another builder with a different architecture. Using remote builders isn’t really an option since these are being run on GitHub Actions. As a stopgap, I have set the --no-build
flag.
Is it possible to make commands like nix flake check
only build and check stuff that applies to the architecture of the host system? Then, I’d just add another runner using aarch64 to check anything ARM related.
Thanks all!
I assume you mean the build system - and that’s already the case by default. So I can only assume something is incorrect with your checks or you’re using --all-systems
, or something’s up with the gha config
This actually prompted me to go look and see if there was anything that was abnormal.
Here’s an example of an error I’d get without the --no-build
flag:
error: a 'aarch64-linux' with features {} is required to build '/nix/store/km3dhvlwhx8y2xxrkq886c46av684qzk-dhcpcd.conf.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test, uid-range}
It seems to be this line that I added when setting up deploy-rs that is causing the issue:
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
Without that, the build runs. I assume there’s something I can add that will make that check run fine, given that I’ve managed to make other parts of my flake build cross platform. Nix the language though is still very hard to read for me.