nix-dotfiles/modules/opt/microvm-host.nix
ahuston-0 eba9d9c4cd
idek what i did to fix this
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
2024-08-06 20:03:52 -04:00

35 lines
856 B
Nix

{
config,
lib,
inputs,
...
}:
let
cfg = config.rad-dev.microvm-host;
microvm = inputs.microvm.nixosModules;
in
{
imports = [ microvm.host ];
options.rad-dev.microvm-host = {
vms = lib.mkOption {
type = lib.types.attrs;
default = { };
description = "A list of VMs to construct on the host";
};
};
config = {
networking.useNetworkd = true;
microvm.vms = cfg.vms;
# TODO: deprecate this once we have syslog forwarders
# systemd.tmpfiles.rules = map (
# vmHost:
# let
# machineId = lib.addresses.machineId.${vmHost};
# in
# # creates a symlink of each MicroVM's journal under the host's /var/log/journal
# "L+ /var/log/journal/${machineId} - - - - /var/lib/microvms/${vmHost}/journal/${machineId}"
# ) (builtins.attrNames lib.addresses.machineId);
};
}