Gnome custom pam module

I have Nixos on an HP Chromebook, and the fingerprint reader is currently not supported by libfprint.
However, @ChocolateLoverRaj created a customer driver that works fine with KDE, but I was unable to configure the pam module correctly in Gnome.
I tried copying the standard fingerprint pam configuration from Gnome, but that did not work.

How do I configure Gnome to use the custom fingerprint reader driver?

Code

          security.pam.services.gdm-fingerprint.text = ''
            auth       required                    pam_shells.so
            auth       requisite                   pam_nologin.so
            auth       requisite                   pam_faillock.so      preauth
            auth       required                    ${rust-fp-pam-module}/lib/librust_fp_pam_module.so
            auth       required                    pam_env.so
            auth       [success=ok default=1]      ${gdm}/lib/security/pam_gdm.so
            auth       optional                    ${gnome-keyring}/lib/security/pam_gnome_keyring.so


            account    include                     login

            password   required                    pam_deny.so

            session    include                     login
            '';

While I was experiment with creating a custom PAM module for fingerprint unlock I tried doing it in GNOME as well as KDE. However, even after making sure the gdm-fingerprint file is there and has the custom pam module, GNOME still was not showing a fingerprint unlock option. My guess is that GNOME directly calls some libfprint API to check if fingerprint unlock is available before using the PAM service.

I still don’t know how to do this. Maybe someone who knows how GNOME works or can look into the code can explain why it doesn’t work, or maybe change the GNOME code to make it work.