Skip to content

bugfix: Detached headers idempotence check - #1286

Open
Hussainity wants to merge 2 commits into
nix-community:masterfrom
Hussainity:hm/probe-detached-header
Open

bugfix: Detached headers idempotence check#1286
Hussainity wants to merge 2 commits into
nix-community:masterfrom
Hussainity:hm/probe-detached-header

Conversation

@Hussainity

Copy link
Copy Markdown

Summary

Detached LUKS headers were not handled correctly by the _create idempotence check in lib/types/luks.nix.

The old logic still probed config.device. For detached-header setups, that meant rerun could mis-detect an already-initialized LUKS device and fall back into luksFormat.

Fix

Probe the actual LUKS header target instead of the payload device, and make the create guard depend only on cryptsetup isLuks for that target.

Test

Add a detached-header regression test that exercises the direct-mode idempotence path.

@Hussainity
Hussainity force-pushed the hm/probe-detached-header branch from ba02cb2 to 93ec363 Compare August 8, 2026 12:52
@Hussainity

Copy link
Copy Markdown
Author

@Lassulus requesting maintainer review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant