diff options
author | Florian Klink <flokli@flokli.de> | 2021-01-08 23:54:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 23:54:46 +0100 |
commit | 964c419bc0ed33efaa480746dbc30003aca3c74b (patch) | |
tree | abc1f7aeb69fc569039a8455929954d7391aac3b /nixos | |
parent | 6ddc2e93cd0096da823db141eccf9d3d89630b2c (diff) | |
parent | 56d7e7492cbf2d61bd570f5b0a8015040e80aae9 (diff) |
Merge pull request #107497 from helsinki-systems/fix/tmp-mount
nixos/tmp: Make /tmp on ramdisk usable again
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/tmp.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/tmp.nix b/nixos/modules/system/boot/tmp.nix index 26eb172210e7..837e308cbea9 100644 --- a/nixos/modules/system/boot/tmp.nix +++ b/nixos/modules/system/boot/tmp.nix @@ -30,7 +30,13 @@ with lib; config = { - systemd.additionalUpstreamSystemUnits = optional config.boot.tmpOnTmpfs "tmp.mount"; + systemd.mounts = mkIf config.boot.tmpOnTmpfs [ + { + what = "tmpfs"; + where = "/tmp"; + mountConfig.Options = [ "mode=1777" "strictatime" "rw" "nosuid" "nodev" "size=50%" ]; + } + ]; systemd.tmpfiles.rules = optional config.boot.cleanTmpDir "D! /tmp 1777 root root"; |