mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
32 lines
829 B
Nix
32 lines
829 B
Nix
{ inputs, config, hostname, microvm, pkgs, sops-nix, username, ... }: {
|
|
microvm = {
|
|
hypervisor = "qemu";
|
|
socket = "control.socket";
|
|
vcpu = 1;
|
|
volumes = [
|
|
{
|
|
#image = "/persist/microvm/${config.networking.hostName}-var.img";
|
|
image = "/tmp/${config.networking.hostName}-var.img";
|
|
mountPoint = "/var";
|
|
size = 1024;
|
|
}
|
|
];
|
|
shares = [
|
|
{
|
|
# use "virtiofs" for MicroVMs that are started by systemd
|
|
proto = "9p";
|
|
tag = "ro-store";
|
|
# a host's /nix/store will be picked up so that no
|
|
# squashfs/erofs will be built for it.
|
|
source = "/nix/store";
|
|
mountPoint = "/nix/.ro-store";
|
|
}
|
|
];
|
|
interfaces = [{
|
|
type = "tap";
|
|
id = "vm-nginx-proxy";
|
|
mac = "02:00:00:00:00:01";
|
|
}];
|
|
};
|
|
}
|
|
|