mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(aya): qemu-aarch64 builder (disabled)
`binfmt_misc` does not currently work in containers...
This commit is contained in:
parent
0eb9efcd18
commit
767247cc91
3 changed files with 41 additions and 0 deletions
30
nixos/cross/aarch64.nix
Normal file
30
nixos/cross/aarch64.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, config, lib, ... }: let
|
||||
inherit (lib.options) mkEnableOption mkPackageOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
cfg = config.boot.binfmt.cross.aarch64;
|
||||
in {
|
||||
options = {
|
||||
boot.binfmt.cross.aarch64 = {
|
||||
enable = mkEnableOption "qemu-aarch64" // {
|
||||
default = true;
|
||||
};
|
||||
package = mkPackageOption pkgs "qemu" { };
|
||||
armv7l = mkEnableOption "arm.cachix.org";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
boot.binfmt = {
|
||||
emulatedSystems = mkIf cfg.enable [ "aarch64-linux" ];
|
||||
registrations.aarch64-linux = mkIf cfg.enable {
|
||||
interpreter = "${cfg.package}/bin/qemu-aarch64";
|
||||
wrapInterpreterInShell = false;
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings = mkIf cfg.armv7l {
|
||||
substituters = [ "https://arm.cachix.org/" ];
|
||||
trusted-public-keys = [ "arm.cachix.org-1:5BZ2kjoL1q6nWhlnrbAl+G7ThY7+HaBRD9PZzqZkbnM=" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue