Skip to content

nixos/stage-1: respect X-mount.subdir option #414391

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chetgurevitch
Copy link
Contributor

Updates stage-1.nix to make enabling util-linux's mount possible for multiple reasons, like the existing ZFS mount helper use case and the new X-mount.subdir use case.

Resolves #414390


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/` 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. labels Jun 6, 2025
Copy link
Contributor

@ElvishJerricco ElvishJerricco left a comment

Choose a reason for hiding this comment

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

Can we just.... always use util-linux mount? It's arguably always good to delegate to the mount helper, and to support the X-mount.* options that only util-linux supports. The only concern is if that grows the size of the initrd by an intolerable amount but I strongly suspect it'll only be a few kilobytes so we should just do it.

And yea while we're at it we should just move the mount.zfs part into the ZFS module.

@chetgurevitch
Copy link
Contributor Author

I had that thought too, both changes sound good to me but will double check the size to make sure.

@chetgurevitch chetgurevitch force-pushed the respect-X.mount-subdir-stage-1 branch from 6f3ced8 to 1007970 Compare June 15, 2025 07:36
@chetgurevitch
Copy link
Contributor Author

chetgurevitch commented Jun 15, 2025

Yeah it's only 12kB, made it unconditional. The ZFS module now includes mount.zfs either in extraUtilsCommands or systemd.extraBin. Also I noticed zdb doesn't get added with boot.initrd.systemd, is that an oversight?

- respect X-mount.subdir option
- fix mount test redirection (1>&1 to 2>&1)
@chetgurevitch chetgurevitch force-pushed the respect-X.mount-subdir-stage-1 branch from 1007970 to 47a31c3 Compare June 18, 2025 02:04
@qubitnano
Copy link
Contributor

This has been working for me on two bcachefs on root machines with subvolumes.

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
None yet
Development

Successfully merging this pull request may close these issues.

nixos/stage-1: X-mount.subdir option not respected
5 participants