Merge pull request #107497 from helsinki-systems/fix/tmp-mount

nixos/tmp: Make /tmp on ramdisk usable again
This commit is contained in:
Florian Klink 2021-01-08 23:54:46 +01:00 committed by GitHub
commit 964c419bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,13 @@ with lib;
config = { 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"; systemd.tmpfiles.rules = optional config.boot.cleanTmpDir "D! /tmp 1777 root root";