dec
Some checks are pending
/ check (push) Waiting to run

This commit is contained in:
iofq 2025-09-28 14:49:19 -05:00
parent 3f81a20e87
commit 77164adab6
12 changed files with 412 additions and 485 deletions

View file

@ -0,0 +1,37 @@
{ lib, pkgs, ... }:
let
attrs = {
forgejo-runner = {
ipv4 = "10.0.0.2";
subnet = "/24";
mac = "02:00:00:00:00:01";
};
};
genVMConfig = name: addr: {
restartIfChanged = true;
pkgs = pkgs;
config = {
microvm = {
shares = lib.mkIf (addr.ro-store == true) [
{
source = "/nix/store";
mountPoint = "/nix/.ro-store";
tag = "ro-store";
proto = "virtiofs";
}
];
interfaces = [
{
type = "tap";
id = name;
mac = attrs.${name}.mac;
}
];
};
}
// import ./configuration.nix { inherit name attrs; };
};
in
{
microvm.vms = lib.mapAttrs genVMConfig attrs;
}