Skip to content

Commit

Permalink
Merge pull request #107497 from helsinki-systems/fix/tmp-mount
Browse files Browse the repository at this point in the history
nixos/tmp: Make /tmp on ramdisk usable again
  • Loading branch information
flokli committed Jan 8, 2021
2 parents 6ddc2e9 + 56d7e74 commit 964c419
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nixos/modules/system/boot/tmp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 964c419

Please sign in to comment.