Skip to content

Commit

Permalink
Add binfmt aarch64 emulation
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Rautiola <joonas.rautiola@unikie.com>
  • Loading branch information
joinemm committed May 23, 2024
1 parent 18f4518 commit 274cf3f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions hosts/builders/build3/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
imports =
[
../ficolo.nix
../cross-compilation.nix
../developers.nix
../yubikey.nix
inputs.sops-nix.nixosModules.sops
Expand Down Expand Up @@ -43,8 +44,6 @@

nix = {
settings = {
# add ability to build 32 bit
extra-platforms = ["i686-linux"];
trusted-users = ["@wheel" "build3"];
};

Expand Down
6 changes: 1 addition & 5 deletions hosts/builders/build4/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
imports =
[
../ficolo.nix
../cross-compilation.nix
../yubikey.nix
]
++ (with self.nixosModules; [
Expand All @@ -15,11 +16,6 @@

networking.hostName = "build4";

nix.settings = {
# add ability to build 32 bit
extra-platforms = ["i686-linux"];
};

users.users.yubimaster.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA2BcpFzSXOuK9AzN+J1HBVnuVV8D3wgdEwPuILNy2aM signer"
];
Expand Down
9 changes: 9 additions & 0 deletions hosts/builders/cross-compilation.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{
# list of systems to emulate using binfmt
boot.binfmt.emulatedSystems = ["aarch64-linux"];

# extra nix build platforms to enable
nix.settings.extra-platforms = ["i686-linux"];
}

0 comments on commit 274cf3f

Please sign in to comment.