{ config, lib, inputs, ... }: let cfg = config.os.vms; sharedSecrets = [ { tag = "shared-secrets"; proto = "virtiofs"; source = "/etc/nixos/secrets"; mountPoint = "/etc/nixos/secrets"; } ]; in { imports = [ inputs.microvm.nixosModules.host ]; options.os.vms = { net-core.enable = lib.mkEnableOption "enables the net-core virtual machine"; }; config = lib.mkMerge [ (lib.mkIf cfg.net-core.enable { microvm.vms.net-core = { autostart = true; config = { imports = [ ../vms/net-core.nix ]; microvm.shares = sharedSecrets; }; }; }) ]; }