Allow adding custom options to individual vms

This commit is contained in:
Manuel Thalmann 2024-05-01 00:03:35 +02:00
parent 591ba4e96e
commit 0480f0d4a4

View file

@ -1,5 +1,13 @@
{ config, lib, options, pkgs, ... }: {
options = {};
{ config, lib, options, pkgs, ... }:
let
vmOptions = { };
in {
options = {
virtualisation = {
vmVariant = vmOptions;
vmVariantWithBootLoader = vmOptions;
};
};
config = {
# Replace native `qemu` with `remote-viewer`
@ -41,26 +49,5 @@
paths = [ wrapped ];
});
};
virtualisation =
let vmConfig = {
boot.loader.efi.efiSysMountPoint = lib.mkForce "/boot";
virtualisation = {
qemu.options = [
"-display sdl"
];
sharedDirectories = {
hostKeys = {
source = "/etc/ssh";
target = "/etc/ssh";
};
};
};
};
in {
vmVariantWithBootLoader = vmConfig;
};
};
}