mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 13:03:56 -05:00
40 lines
1.5 KiB
Nix
40 lines
1.5 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
options = {
|
|
alyraffauf.desktop.gnome.fprintdFix.enable =
|
|
lib.mkEnableOption
|
|
"Fix fprintd and pam issues with GNOME Display Manager.";
|
|
};
|
|
|
|
config = lib.mkIf config.alyraffauf.desktop.gnome.fprintdFix.enable {
|
|
# Need to change the order pam loads its modules
|
|
# to get proper fingerprint behavior on GDM and the lockscreen.
|
|
security.pam.services = {
|
|
login.fprintAuth = false;
|
|
gdm-fingerprint = lib.mkIf (config.services.fprintd.enable) {
|
|
text = ''
|
|
auth required pam_shells.so
|
|
auth requisite pam_nologin.so
|
|
auth requisite pam_faillock.so preauth
|
|
auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
|
auth optional pam_permit.so
|
|
auth required pam_env.so
|
|
auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so
|
|
auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
|
|
|
|
account include login
|
|
|
|
password required pam_deny.so
|
|
|
|
session include login
|
|
session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|