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:
parent
db9a28338f
commit
56d7e7492c
1 changed files with 7 additions and 1 deletions
|
@ -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";
|
||||
|
||||
|
|
Loading…
Reference in a new issue