From 7abb613f20356965562ffb4e6842e4b12f58b7e2 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Sat, 19 Oct 2024 01:07:24 -0500 Subject: [PATCH] Automatically enable basic emulation on buildlers Since my remote build machines are going to be limited to only my most powerful systems, it makes sense that they are going to be able to use a few cycles to do some basic emulation. So my x86_64-linux systems can emulate aarch64 and i686 pretty easily to speed up the few things that I would build on them --- modules/nixos/remote-builder.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/nixos/remote-builder.nix b/modules/nixos/remote-builder.nix index e0faeeb..21dfe56 100644 --- a/modules/nixos/remote-builder.nix +++ b/modules/nixos/remote-builder.nix @@ -19,6 +19,13 @@ with lib; isNormalUser = true; useDefaultShell = true; }; + # The builder user needs to be trusted to submit builds nix.settings.trusted-users = [ config.users.users.remote-builder-user.name ]; + # If the system is powerful enough to be a remote builder, it should + # be powerful enough to do some basic qemu stuff + boot.binfmt.emulatedSystems = [ + "i686-linux" + "aarch64-linux" + ]; }; }