overlay hunt: refactor tpm2-tools and tpm2-pkcs11 out of global overlay#1846
Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom Mar 23, 2026
Merged
overlay hunt: refactor tpm2-tools and tpm2-pkcs11 out of global overlay#1846brianmcgillion merged 1 commit intotiiuae:mainfrom
brianmcgillion merged 1 commit intotiiuae:mainfrom
Conversation
a481a78 to
11109e7
Compare
Move tpm2-tools and tpm2-pkcs11 package overrides from the global nixpkgs overlay into a new ghaf.security.tpm2 module that provides scoped package options (tools and pkcs11). Both packages disable abrmd (D-Bus TPM resource manager) since Ghaf accesses TPM directly via the kernel resource manager (/dev/tpmrm0). The tpm2-pkcs11 package additionally disables FAPI support. By removing these from the global overlay, the stock tpm2-tools and tpm2-pkcs11 derivation hashes are preserved for all packages that depend on them transitively, allowing binary cache hits instead of rebuilding from source. All consumer modules (hardware/tpm2, vm-tpm, storagevm, disk-encryption, deferred-disk-encryption, jetson-orin) now reference the module options instead of pkgs.tpm2-tools / pkgs.tpm2-pkcs11. Signed-off-by: Vadim Likholetov <vadikas@gmail.com> Signed-off-by: vadik likholetov <vadikas@gmail.com>
11109e7 to
8199065
Compare
avnik
reviewed
Mar 23, 2026
Contributor
avnik
left a comment
There was a problem hiding this comment.
Too much "just formatting" changes, rewriting out with pkgs; etc
brianmcgillion
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ghaf.security.tpm2module (modules/common/security/tpm2-packages.nix)ghaf.security.tpm2.toolsandghaf.security.tpm2.pkcs11package options with the same overrides (abrmd disabled, FAPI disabled for pkcs11)pkgs.tpm2-tools/pkgs.tpm2-pkcs11Motivation
Global overlays on tpm2-tools and tpm2-pkcs11 change their derivation hashes, which forces rebuilds of all transitive dependents from source instead of using binary cache. By scoping the overrides to a module, stock packages retain their cache-friendly hashes.
Changed files
modules/common/security/tpm2-packages.nix— definesghaf.security.tpm2.{tools,pkcs11}modules/common/security/default.nix— imports new modulemodules/hardware/x86_64-generic/modules/tpm2.nixmodules/microvm/common/vm-tpm.nixmodules/microvm/common/storagevm.nixmodules/partitioning/deferred-disk-encryption.nixmodules/common/security/disk-encryption.nixmodules/reference/hardware/jetpack/nvidia-jetson-orin/jetson-orin.nixoverlays/custom-packages/tpm2-tools/default.nixoverlays/custom-packages/tpm2-pkcs11/default.nixTest plan