roles/build-machine: ship qemu

This commit is contained in:
Colin 2023-03-15 00:54:05 +00:00
parent 7918403d1b
commit 2a1d6e1faa

View File

@ -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;