diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 586f5d9c0a3..e0b3bb2c683 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -443,6 +443,13 @@ in options = [ "trans=virtio" "version=9p2000.L" "veryloose" ]; neededForBoot = true; }; + "/tmp" = mkIf config.boot.tmpOnTmpfs + { device = "tmpfs"; + fsType = "tmpfs"; + neededForBoot = true; + # Sync with systemd's tmp.mount; + options = [ "mode=1777" "strictatime" "nosuid" "nodev" ]; + }; "/tmp/xchg" = { device = "xchg"; fsType = "9p";