| 26 Jun 2021 |
das_j | I think there is a second way but I can't find it | 10:58:09 |
wucke13 | Ahh, now I found it. Thank you so much! | 10:58:34 |
das_j | You're welcome :) | 10:58:42 |
wucke13 | even if I have only a localhost machine, I also need to enable nix.distributedBuilds ? | 10:59:17 |
das_j | ummmm | 10:59:22 |
das_j | I'm not 100% sure | 10:59:25 |
wucke13 | It's not working without it. lets test it with it | 10:59:57 |
das_j | It might only parse the file when distributed builds are enabled | 11:00:13 |
wucke13 | Hmmh, still not working. I have the following relevant options set, what could be missing?
nix = {
extraOptions = ''
allowed-uris = https:// ssh://
'';
distributedBuilds = true;
buildMachines = [{
hostName = "localhost";
systems = [
"aarch64-linux"
"i686-linux"
"wasm32-wasi"
"x86_64-linux"
"x86_64-windows"
];
}];
};
boot.binfmt.emulatedSystems =
[ "aarch64-linux" "wasm32-wasi" "x86_64-windows" ];
| 11:03:51 |
wucke13 | (the build in question is aarch64 | 11:04:12 |
das_j | does it show in your hydra? | 11:04:34 |
wucke13 | How would I check? | 11:04:44 |
das_j | https://hydra.local/admin/machines | 11:04:51 |
das_j | you might need to wait 10min or restart the queue runner | 11:05:19 |
wucke13 | Jup, with aarch64-linux | 11:05:19 |
das_j | oh | 11:05:23 |
das_j | so it should work | 11:05:27 |
das_j | hydra knows it can build there | 11:05:33 |
das_j | if it doesn't work, your binfmt might be misconfigured | 11:05:50 |
das_j | we use something along the lines of
boot.binfmt.registrations = {
qemu-aarch64 = {
magicOrExtension = "\\x7fELF\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\xb7";
mask = "\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xfe\\xff\\xff";
interpreter = "${pkgs.qemu}/bin/qemu-aarch64";
};
};
nix.sandboxPaths [ "/run/binfmt" "${pkgs.qemu}" ];
| 11:07:16 |
wucke13 | I'm able to locally build the thing on that machine using nix build <the flake>#aarch64.<mypackage> though | 11:09:15 |
wucke13 | So I would assume that my binfmt setup is healthy | 11:09:33 |
das_j | yeah it probably is | 11:09:43 |
wucke13 | * I'm able to locally build the thing on that machine using nix build <the flake>#packages.aarch64-linux.<mypackage> though | 11:09:46 |
wucke13 | I'll try to restart all hydra services | 11:10:22 |
wucke13 | In reply to @wucke13:matrix.org even if I have only a localhost machine, I also need to enable nix.distributedBuilds ? So, first thing: This seems to not be necessary. Just changing localhost already propagated to hydra, according to the admin/machines overview | 11:16:20 |
wucke13 | And indeed, rebooting the machine did the trick. So, thank you das_j , you solved all my issues in this regard :) | 11:17:28 |
wucke13 | In reply to @wucke13:matrix.org Is it possible to have hydra build the nixosConfigurations in a flake? Any chance that you also know an answer to this one? 🙂 | 11:18:43 |
ajs124 | one note about the machines file, that might be useful, is that you don't have to use /etc/nix/machines, but can give hydra its own machines file, e.g. with services.hydra.buildMachinesFiles no idea about the flakes thing, though | 11:21:28 |
das_j | In reply to @wucke13:matrix.org Any chance that you also know an answer to this one? 🙂 No, I prefer stable nix | 11:26:38 |