summaryrefslogtreecommitdiffstats
path: root/nixos/modules/virtualisation/qemu-vm.nix
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/qemu-vm.nix
parent5b759293e09a062373d4b2843c5bad89d5a47165 (diff)
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/qemu-vm.nix')
-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";