tpm2-totp with Plymouth

tpm2-totp attests the trustworthiness of a device against a human using time-based one-time passwords. This module uses a tpm2-totp configuration to display a TOTP at boot using Plymouth.

Quick start

1. Enable modules

{
  boot.plymouth.enable = true;
  boot.plymouth.tpm2-totp.enable = true;
}

Switch to the new configuration before proceeding to the next step.

2. Configure tpm2-totp

Generate a new TOTP secret and save the secret in your chosen authenticator app. See man tpm2-totp for commands and configuration examples.

More information, including security considerations, can be found in the README.md in the tpm2-totp repository. Be sure to select the tag for the version of tpm2-totp you have installed.

3. Check configuration

Reboot and you should see the TOTP appear on the Plymouth boot screen. The TOTP should match the code displayed in your authenticator app (or the code immediately before/after).