Skip to content

nixos: Support fileSystems.<name>.depends with fstab-generator#233707

Merged
philiptaron merged 3 commits intoNixOS:masterfrom
ElvishJerricco:systemd-fstab-depends
Aug 30, 2024
Merged

nixos: Support fileSystems.<name>.depends with fstab-generator#233707
philiptaron merged 3 commits intoNixOS:masterfrom
ElvishJerricco:systemd-fstab-depends

Conversation

@ElvishJerricco
Copy link
Copy Markdown
Contributor

@ElvishJerricco ElvishJerricco commented May 23, 2023

Description of changes

I have barely tested this, so I'm not entirely sure it's correct. Closes #217179

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
  • 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 May 23, 2023
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI, in the diskless VM PR, I will introduce this definitely and remove any manual mount.

Copy link
Copy Markdown
Contributor

@astro astro Nov 28, 2023

Choose a reason for hiding this comment

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

What is the diskless VM PR? It got referenced below.

@ElvishJerricco ElvishJerricco force-pushed the systemd-fstab-depends branch from 720675b to 574a778 Compare May 24, 2023 00:07
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 24, 2023
@ElvishJerricco
Copy link
Copy Markdown
Contributor Author

This would fix #217179

@NickCao NickCao mentioned this pull request Nov 28, 2023
13 tasks
@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict This PR has merge conflicts with the target branch labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@ElvishJerricco ElvishJerricco marked this pull request as ready for review August 27, 2024 20:34
@ElvishJerricco ElvishJerricco requested a review from nikstur August 27, 2024 20:34
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 27, 2024
@ElvishJerricco
Copy link
Copy Markdown
Contributor Author

ElvishJerricco commented Aug 27, 2024

@nikstur I updated this with a little bit of tweaking to the overlay fs stuff. The depends functionality should be the same on systemd initrd, with slightly better behavior in scripted initrd. While testing with scripted, I noticed it doesn't work with the ro overlays, so I just added an assertion to disallow that, rather than trying to implement it.

(I also nixfmt'd some of this, so forgive the reformatting).

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 27, 2024
@philiptaron
Copy link
Copy Markdown
Contributor

I'll note that ofBorg is unhappy for the same reason that I created #320846: the value of the message depends on the assertion failing, and as written it doesn't protect against that being so.

@ElvishJerricco
Copy link
Copy Markdown
Contributor Author

ElvishJerricco commented Aug 30, 2024

the value of the message depends on the assertion failing, and as written it doesn't protect against that being so.

@philiptaron No, that's not what's causing ofborg to fail. I apparently committed the assertion without testing that it works correctly. It should be fs.overlay.upperdir, not fs.upperdir. My bad. The message only depends on fs.mountPoint, which should always exist.

Copy link
Copy Markdown
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

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

This looks great. I'm going to give it a whirl on my home machine and report back.

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Aug 30, 2024
philiptaron added a commit to philiptaron/flock.nix that referenced this pull request Aug 30, 2024
Copy link
Copy Markdown
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

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

Tested and works.

@philiptaron philiptaron merged commit 4710721 into NixOS:master Aug 30, 2024
philiptaron added a commit to philiptaron/flock.nix that referenced this pull request Aug 30, 2024
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 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

nixos: systemd doesn't respect fileSystems.<name>.depends

5 participants