diff --git a/nixos/modules/security/tpm2.nix b/nixos/modules/security/tpm2.nix index f60adb24cdbe..bb947cb32a56 100644 --- a/nixos/modules/security/tpm2.nix +++ b/nixos/modules/security/tpm2.nix @@ -75,8 +75,8 @@ in package = lib.mkOption { description = "tpm2-pkcs11 package to use"; type = lib.types.package; - default = pkgs.tpm2-pkcs11; - defaultText = lib.literalExpression "pkgs.tpm2-pkcs11"; + default = if cfg.abrmd.enable then pkgs.tpm2-pkcs11.abrmd else pkgs.tpm2-pkcs11; + defaultText = lib.literalExpression "if config.security.tpm2.abrmd.enable then pkgs.tpm2-pkcs11.abrmd else pkgs.tpm2-pkcs11"; }; };