From c353eb38b477a005498a75b9bec5d9f67cdc1c63 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 21 Mar 2024 12:56:37 -0400 Subject: [PATCH] gnome/laveridge: moved fingerprint login hack to gnome modules --- hosts/lavaridge/default.nix | 24 +----------------------- modules/gnome/fingerprint.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 modules/gnome/fingerprint.nix diff --git a/hosts/lavaridge/default.nix b/hosts/lavaridge/default.nix index 7b6272ab..89579066 100644 --- a/hosts/lavaridge/default.nix +++ b/hosts/lavaridge/default.nix @@ -14,6 +14,7 @@ ../../users/aly.nix ./hardware-configuration.nix # Include the results of the hardware scan. # ../../modules/gnome + # ../../modules/gnome/fingerprint.nix # ../../modules/gnome/fractional_scaling.nix ]; @@ -26,29 +27,6 @@ networking.hostName = "lavaridge"; # Define your hostname. - # 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; - security.pam.services.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 - ''; - }; - services.fwupd.enable = true; # # we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware # services.fwupd.package = (import (builtins.fetchTarball { diff --git a/modules/gnome/fingerprint.nix b/modules/gnome/fingerprint.nix new file mode 100644 index 00000000..5baf5ec4 --- /dev/null +++ b/modules/gnome/fingerprint.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: + +{ + # 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; + security.pam.services.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 + ''; + }; +} \ No newline at end of file