nixos/tmp: Make /tmp on ramdisk usable again

@poettering decided we only need a limited number of inodes in our /tmp,
so why not limit that for every systemd user? That makes medium-sized nix
builds impossible so this commit restores the old behaviour which is the
kernel default of half the number of physical RAM pages which does not
seem too unreasonable to me.
This commit is contained in:
Janne Heß
2020-12-23 22:44:20 +01:00
parent db9a28338f
commit 56d7e7492c

View File

@@ -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";