From 2a1d6e1faa42b8691e2b764809b4b9d9575b1386 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 15 Mar 2023 00:54:05 +0000 Subject: [PATCH] roles/build-machine: ship qemu --- hosts/modules/roles/build-machine.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/modules/roles/build-machine.nix b/hosts/modules/roles/build-machine.nix index 23baff65..564faf9c 100644 --- a/hosts/modules/roles/build-machine.nix +++ b/hosts/modules/roles/build-machine.nix @@ -1,4 +1,4 @@ -{ config, lib, sane-lib, ... }: +{ config, lib, pkgs, sane-lib, ... }: let inherit (lib) mkIf mkMerge mkOption types; @@ -22,7 +22,13 @@ in }; config = mkMerge [ + ({ + sane.programs.qemu = pkgs.qemu; + }) (mkIf cfg.enable { + # enable opt-in emulation of any package at runtime. + # i.e. `nix build '.#host-pkgs.moby.bash' ; qemu-aarch64 ./result/bin/bash`. + sane.programs.qemu.enableFor.user.colin = true; # serve packages to other machines that ask for them sane.services.nixserve.enable = true;