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

treewide: tmpfiles.rules -> tmpfiles.settings #343796

Open
wants to merge 64 commits into
base: master
Choose a base branch
from

Conversation

h7x4
Copy link
Member

@h7x4 h7x4 commented Sep 22, 2024

Description of changes

This PR rewrites the tmpfile rules to use the structured attrs variant of the tmpfiles option, for a chunk of nixos modules. The change should not have any functional effect.

Continuation #280373

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@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 Sep 22, 2024
@adamcstephens
Copy link
Contributor

I don’t consider this an improvement so will not approve, but won’t argue or block it as you’ve already done a batch of these.

@h7x4
Copy link
Member Author

h7x4 commented Sep 22, 2024

That's okay :)

The main improvement I see with this API, is that the end user can reach for an entry and edit it through the module system, if they encounter an error or unexpected/opinionated setup. Of course with a recommendation that they report an issue to nixpkgs, but without needing to mess around with disabledModules or whatnot in the meanwhile. The new API might be a bit more noisy, but I think that trade is worth it.

@h7x4 h7x4 force-pushed the nixos-use-tmpfiles-settings branch from 931cfd4 to 8d4e84a Compare September 28, 2024 09:22
@Ma27
Copy link
Member

Ma27 commented Sep 30, 2024

Fwiw I have a hard time considering this an improvement as long as #295872 isn't fixed.

@h7x4
Copy link
Member Author

h7x4 commented Sep 30, 2024

@Ma27 I'm not sure I fully understand your reasoning. Is it because more widespread of systemd.tmpfiles.settings will lead to more people looking it up, resulting in more time and confusion spent on the <name>.<name>.<name> issue by a larger amount of people?

I still think using attrs is an improvement due to ease of overriding and being able to address the option values. But I'd also be okay with drafting until the <name>.<name>.<name> issue is solved.

@Ma27
Copy link
Member

Ma27 commented Sep 30, 2024

OK context was that the change was suggested to be in line with the PR.
Revisiting this, I think this is more appropriate to point out in the original discussion, apologies!

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 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-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants