Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/tmp tmpfs is using the systemd upstream mount. #14777

Open
sheenobu opened this issue Apr 17, 2016 · 2 comments
Open

/tmp tmpfs is using the systemd upstream mount. #14777

sheenobu opened this issue Apr 17, 2016 · 2 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos

Comments

@sheenobu
Copy link
Contributor

Issue description

Because of how the tmp mount is defined (it is shipped with systemd), we are unable to configure the mounting of tmpfs without disabling boot.tmpOnTmpfs and providing a custom systemd.mounts. I've been able to do this here:

https://gist.github.com/sheenobu/09947df2480e693161d3b3d83daddd49

Should the tmp.mount systemd unit be generated like above within the nixos config / https://github.com/NixOS/nixpkgs/blob/32b7b0009f168cb7e020d297c2f336ef352e9ec1/nixos/modules/system/boot/tmp.nix ?

Steps to reproduce

Enable tmpOnTmpfs.
Check systemctl cat tmp.mount.
tmp.mount is labelled as shipped with systemd and therefore not something configurable within nixos.
tmp.mount has options listed but no way to change them.

Technical details

  • System: 16.03.581.e409886
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 16.03.581.e409886
@andersk
Copy link
Contributor

andersk commented May 4, 2018

I don’t know if this has changed since the report, but it seems you can configure tmp.mount:

{
  boot.tmpOnTmpfs = true;
  systemd.mounts = [{
    where = "/tmp";
    what = "tmpfs";
    options = "1777,strictatime,nosuid,nodev,size=30%";
  }];
}

This generates an override file at /etc/systemd/system/tmp.mount.d/overrides.conf:

[Unit]

[Mount]
Options=mode=1777,strictatime,nosuid,nodev,size=30%
What=tmpfs
Where=/tmp

Perhaps the syntax could be made nicer (if systemd.mounts accepted a set with where as the key, and what were made optional, we could just write systemd.mounts."/tmp".options = "1777,strictatime,nosuid,nodev,size=30%";).

@stale
Copy link

stale bot commented Jun 4, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants