From 70203d485ac9a564452db6a3f0ad56bfec07bcc3 Mon Sep 17 00:00:00 2001 From: oddlama Date: Sat, 3 Jun 2023 20:17:38 +0200 Subject: [PATCH] feat(microvms): use systemd in stage1 --- modules/microvms.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/microvms.nix b/modules/microvms.nix index d329ac1..c5bdfe3 100644 --- a/modules/microvms.nix +++ b/modules/microvms.nix @@ -130,6 +130,12 @@ tag = "ro-store"; proto = "virtiofs"; } + { + source = "/state/vms/${vmName}"; + mountPoint = "/state"; + tag = "state"; + proto = "virtiofs"; + } ] # Mount persistent data from the host ++ optional vmCfg.zfs.enable { @@ -140,7 +146,8 @@ }; }; - # FIXME this should be changed in microvm.nix to mkDefault instead of mkForce here + # FIXME this should be changed in microvm.nix to mkDefault in oder to not require mkForce here + fileSystems."/state".neededForBoot = mkForce true; fileSystems."/persist".neededForBoot = mkForce true; # Add a writable store overlay, but since this is always ephemeral @@ -176,9 +183,6 @@ }; }; - # TODO change once microvms are compatible with stage-1 systemd - boot.initrd.systemd.enable = mkForce false; - # TODO mkForce nftables networking.nftables.firewall = { zones = mkForce {