summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-02-03 15:00:34 +0300
committerNikolay Amiantov <ab@fmap.me>2017-02-03 15:02:34 +0300
commit9eb540b807b0bb598352e550635c45c8a92d72b0 (patch)
tree5ef9d6cca66b150836d6f49073f20220ab7b3686 /nixos/modules/virtualisation
parent5b759293e09a062373d4b2843c5bad89d5a47165 (diff)
downloadnixlib-9eb540b807b0bb598352e550635c45c8a92d72b0.tar
nixlib-9eb540b807b0bb598352e550635c45c8a92d72b0.tar.gz
nixlib-9eb540b807b0bb598352e550635c45c8a92d72b0.tar.bz2
nixlib-9eb540b807b0bb598352e550635c45c8a92d72b0.tar.lz
nixlib-9eb540b807b0bb598352e550635c45c8a92d72b0.tar.xz
nixlib-9eb540b807b0bb598352e550635c45c8a92d72b0.tar.zst
nixlib-9eb540b807b0bb598352e550635c45c8a92d72b0.zip
qemu-vm module: fix boot.tmpOnTmpfs
This option caused systemd to mount /tmp on top of /tmp/{xchg,shared}.

Fixes #21490.
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index 586f5d9c0a38..e0b3bb2c683c 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";