Skip to content

nixos/etc: handle mountpoints on top of /etc when switching#328221

Merged
Mic92 merged 2 commits intoNixOS:masterfrom
nikstur:fix-overlay-etc
Jul 18, 2024
Merged

nixos/etc: handle mountpoints on top of /etc when switching#328221
Mic92 merged 2 commits intoNixOS:masterfrom
nikstur:fix-overlay-etc

Conversation

@nikstur
Copy link
Contributor

@nikstur nikstur commented Jul 18, 2024

Description of changes

Fixes #303262 #291398

Should also fix the error reported here: #303262 (comment)

The activation script that remounts the /etc overlay now handles other mount points on top of /etc by bind mounting them to the new temporary /etc overlay and then atomically revealing it.

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.

@nikstur nikstur requested review from Mic92 and arianvp July 18, 2024 16:33
@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 Jul 18, 2024
@nikstur
Copy link
Contributor Author

nikstur commented Jul 18, 2024

@ofborg test activation-etc-overlay-immutable activation-etc-overlay-mutable

@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 Jul 18, 2024
nikstur added 2 commits July 18, 2024 21:28
The activation script that remounts the /etc overlay now handles other
mount points on top of /etc by bind mounting them to the new temporary
/etc overlay and then atomically revealing it.
@Mic92 Mic92 merged commit 054c2d7 into NixOS:master Jul 18, 2024
@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. label Jul 18, 2024
@nikstur nikstur mentioned this pull request Aug 6, 2024
13 tasks
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: 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. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot remount /etc while rebuilding with etc.overlay enabled

3 participants