feat(microvms): use systemd in stage1

This commit is contained in:
oddlama 2023-06-03 20:17:38 +02:00
parent 0cc126fb5f
commit 70203d485a
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -130,6 +130,12 @@
tag = "ro-store"; tag = "ro-store";
proto = "virtiofs"; proto = "virtiofs";
} }
{
source = "/state/vms/${vmName}";
mountPoint = "/state";
tag = "state";
proto = "virtiofs";
}
] ]
# Mount persistent data from the host # Mount persistent data from the host
++ optional vmCfg.zfs.enable { ++ 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; fileSystems."/persist".neededForBoot = mkForce true;
# Add a writable store overlay, but since this is always ephemeral # 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 # TODO mkForce nftables
networking.nftables.firewall = { networking.nftables.firewall = {
zones = mkForce { zones = mkForce {