From 9eb540b807b0bb598352e550635c45c8a92d72b0 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Fri, 3 Feb 2017 15:00:34 +0300 Subject: [PATCH] qemu-vm module: fix boot.tmpOnTmpfs This option caused systemd to mount /tmp on top of /tmp/{xchg,shared}. Fixes #21490. --- nixos/modules/virtualisation/qemu-vm.nix | 7 +++++++ 1 file changed, 7 insertions(+) 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";