drop unused mounts
This commit is contained in:
parent
a56dc3bf8c
commit
07caab537f
|
@ -34,10 +34,16 @@ let
|
|||
|
||||
boot.initrd.kernelModules = [ "virtiofs" ];
|
||||
virtualisation.writableStore = false;
|
||||
virtualisation.fileSystems = {
|
||||
virtualisation.fileSystems = lib.mkForce ({
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
options = [ "defaults" "x-systemd.makefs" ];
|
||||
};
|
||||
"/nix/store" = {
|
||||
options = lib.mkForce [ "x-systemd.requires=systemd-modules-load.service" ];
|
||||
fsType = lib.mkForce "virtiofs";
|
||||
device = "nix-store";
|
||||
options = [ "x-systemd.requires=systemd-modules-load.service" ];
|
||||
fsType = "virtiofs";
|
||||
};
|
||||
|
||||
"/vmstate" = {
|
||||
|
@ -46,18 +52,21 @@ let
|
|||
options = [ "x-systemd.makefs" ];
|
||||
};
|
||||
|
||||
${config.clanCore.secretsUploadDirectory} = lib.mkForce {
|
||||
${config.clanCore.secretsUploadDirectory} = {
|
||||
device = "secrets";
|
||||
fsType = "9p";
|
||||
neededForBoot = true;
|
||||
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
|
||||
};
|
||||
} // lib.listToAttrs (map (folder:
|
||||
lib.nameValuePair folder {
|
||||
device = "/vmstate${folder}";
|
||||
fsType = "none";
|
||||
options = ["bind"];
|
||||
}) stateFolders);
|
||||
|
||||
} // lib.listToAttrs (map
|
||||
(folder:
|
||||
lib.nameValuePair folder {
|
||||
device = "/vmstate${folder}";
|
||||
fsType = "none";
|
||||
options = [ "bind" ];
|
||||
})
|
||||
stateFolders));
|
||||
};
|
||||
|
||||
# We cannot simply merge the VM config into the current system config, because
|
||||
|
|
|
@ -119,10 +119,8 @@ def qemu_command(
|
|||
"-device", "virtio-rng-pci",
|
||||
"-netdev", "user,id=user.0",
|
||||
"-device", "virtio-net-pci,netdev=user.0,romfile=",
|
||||
"-chardev", f"socket,id=char0,path={virtiofsd_socket}",
|
||||
"-device", "vhost-user-fs-pci,chardev=char0,tag=nix-store",
|
||||
"-virtfs", f"local,path={xchg_dir},security_model=none,mount_tag=shared",
|
||||
"-virtfs", f"local,path={xchg_dir},security_model=none,mount_tag=xchg",
|
||||
"-chardev", f"socket,id=char1,path={virtiofsd_socket}",
|
||||
"-device", "vhost-user-fs-pci,chardev=char1,tag=nix-store",
|
||||
"-virtfs", f"local,path={secrets_dir},security_model=none,mount_tag=secrets",
|
||||
"-drive", f"cache=writeback,file={rootfs_img},format=raw,id=drive1,if=none,index=1,werror=report",
|
||||
"-device", "virtio-blk-pci,bootindex=1,drive=drive1,serial=root",
|
||||
|
|
Loading…
Reference in New Issue
Block a user