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

nixos/tmp: move /tmp options under boot.tmp #204534

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

SuperSandro2000
Copy link
Member

Open for suggestions for better names

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 4, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 4, 2022
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to delete all files in {file}`/tmp` during boot.
'';
};

boot.tmpOnTmpfs = mkOption {
boot.tmp.onTmpfs = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to mount a tmpfs on {file}`/tmp` during boot.
Copy link
Member

@Scrumplex Scrumplex Mar 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use this opportunity to also inform about side effects, such as large builds (like the kernel) failing if there isn't enough space?

Last time I tried, a 16GB tmpfs wasn't enough space to build a kernel using Nix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have a suggestion feel free to provide an improved text.

Copy link
Member

@Scrumplex Scrumplex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from my optional suggestion above, LGTM

type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to delete all files in {file}`/tmp` during boot.
'';
};

boot.tmpOnTmpfs = mkOption {
boot.tmp.onTmpfs = mkOption {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: boot.tmp.mountTmpfs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget to push that yesterday but I already renamed it to useTmpfs.

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Mar 18, 2023
Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SuperSandro2000 SuperSandro2000 merged commit 603320b into NixOS:master Apr 12, 2023
@SuperSandro2000 SuperSandro2000 deleted the boot-tmp branch April 12, 2023 19:37
MartinNikov added a commit to MartinNikov/arion that referenced this pull request Aug 22, 2023
…ad of `boot.tmpOnTmpfs`

This change fixes the following warning:

```
trace: Obsolete option `boot.tmpOnTmpfs' is used. It was renamed to `boot.tmp.useTmpfs'.
```

This option was renamed in this PR:
NixOS/nixpkgs#204534
bors bot added a commit to hercules-ci/arion that referenced this pull request Aug 23, 2023
211: fix(modules/service/nixos-init): Use `boot.tmp.useTmpfs` option instead of `boot.tmpOnTmpfs` r=roberth a=MartinNikov

This change fixes the following warning:

```
trace: Obsolete option `boot.tmpOnTmpfs' is used. It was renamed to `boot.tmp.useTmpfs'.
```

This option was renamed in this PR:
NixOS/nixpkgs#204534

Co-authored-by: MartinNikov <99672862+MartinNikov@users.noreply.github.com>
ciarandg pushed a commit to ciarandg/arion that referenced this pull request Dec 17, 2023
…ad of `boot.tmpOnTmpfs`

This change fixes the following warning:

```
trace: Obsolete option `boot.tmpOnTmpfs' is used. It was renamed to `boot.tmp.useTmpfs'.
```

This option was renamed in this PR:
NixOS/nixpkgs#204534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants