gigalint everything
This commit is contained in:
parent
2ce46f1cf5
commit
d4c31f8fd1
39 changed files with 499 additions and 398 deletions
|
|
@ -1,30 +1,44 @@
|
|||
{ lib, pkgs, addressList, ... }:
|
||||
let genVMConfig = { name, config ? {}, ro-store ? true }: {
|
||||
restartIfChanged = true;
|
||||
pkgs = pkgs;
|
||||
config = config // {
|
||||
microvm = {
|
||||
shares = lib.mkIf (ro-store == true) [{
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
tag = "ro-store";
|
||||
proto = "virtiofs";
|
||||
}];
|
||||
interfaces = [
|
||||
{
|
||||
type = "tap";
|
||||
id = name;
|
||||
mac = addressList.${name}.mac;
|
||||
}
|
||||
];
|
||||
};
|
||||
} // import ./vmDefaults.nix { inherit name addressList; };
|
||||
};
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
addressList,
|
||||
...
|
||||
}: let
|
||||
genVMConfig = {
|
||||
name,
|
||||
config ? {},
|
||||
ro-store ? true,
|
||||
}: {
|
||||
restartIfChanged = true;
|
||||
inherit pkgs;
|
||||
config =
|
||||
config
|
||||
// {
|
||||
microvm = {
|
||||
shares = lib.mkIf ro-store [
|
||||
{
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
tag = "ro-store";
|
||||
proto = "virtiofs";
|
||||
}
|
||||
];
|
||||
interfaces = [
|
||||
{
|
||||
type = "tap";
|
||||
id = name;
|
||||
inherit (addressList.${name}) mac;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
// import ./vmDefaults.nix {inherit name addressList;};
|
||||
};
|
||||
in {
|
||||
microvm.vms = {
|
||||
vm-test = genVMConfig {
|
||||
name = "vm-test";
|
||||
config = import ./vm-test.nix { inherit pkgs addressList; };
|
||||
config = import ./vm-test.nix {inherit pkgs addressList;};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue