This is an automated email from the git hooks/post-receive script.
guix_mirror_bot pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 879a07a3f2c services: fprintd: Add pam transformer.
879a07a3f2c is described below
commit 879a07a3f2c6a2198a98367ec1d1e8bc8d37db48
Author: Atte Torri <[email protected]>
AuthorDate: Sun Aug 16 17:22:37 2026 +0200
services: fprintd: Add pam transformer.
This adds a pam transformer to fprintd-service-type which can enable
fingerprint authentication in selected services.
* gnu/services/authentication.scm (fprintd-configuration): Extend record to
take a list of PAM service names to extend.
(fprintd-pam-service): New PAM extension to append pam_fprintd.so as an
authentication method.
(fprintd-service-type): Add service-extension for fprintd-pam-service.
* gnu/services/xorg.scm (gdm-pam-service): Add gdm-fingerprint PAM file.
* doc/guix.texi (Miscellaneous Services): Document the changes.
Merges: #10708
Signed-off-by: moksh <[email protected]>
---
doc/guix.texi | 18 +++++++++++++++++-
gnu/services/authentication.scm | 26 +++++++++++++++++++++++---
gnu/services/xorg.scm | 3 ++-
3 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index ffc529b6b76..4f9427ccbdb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -48080,10 +48080,26 @@ The service type for @command{fprintd}, which
provides the fingerprint
reading capability.
@lisp
-(service fprintd-service-type)
+(service fprintd-service-type
+ (fprintd-configuration
+ (pam-services '("gdm-fingerprint" "sudo"))))
@end lisp
@end defvar
+@deftp {Data Type} fprintd-configuration
+The data type representing the configuration of @command{fprintd}
+
+@table @asis
+@item @code{pam-services}
+List of PAM service names (e.g. @code{"gdm-fingerprint"}) into which
+fingerprint authentication should be inserted. Use
+@code{"gdm-fingerprint"} to enable fingerprint login with GNOME, or
+@code{"sudo"} to enable fingerprint authentication for @code{sudo} on
+the terminal.
+
+@end table
+@end deftp
+
@cindex sysctl
@subsubheading System Control Service
diff --git a/gnu/services/authentication.scm b/gnu/services/authentication.scm
index fbfef2d3d0a..0c92b4378b3 100644
--- a/gnu/services/authentication.scm
+++ b/gnu/services/authentication.scm
@@ -44,20 +44,40 @@
nslcd-configuration?
nslcd-service-type))
-(define-configuration fprintd-configuration
+(define-maybe/no-serialization list-of-strings)
+
+(define-configuration/no-serialization fprintd-configuration
(fprintd (file-like fprintd)
- "The fprintd package"))
+ "The fprintd package")
+ (pam-services (maybe-list-of-strings '())
+ "List of PAM service names (e.g. \"gdm-fingerprint\", \"sudo\")
+into which fingerprint authentication should be inserted."))
(define (fprintd-dbus-service config)
(list (fprintd-configuration-fprintd config)))
+(define (fprintd-pam-service config)
+ (list (pam-extension
+ (transformer
+ (lambda (service)
+ (if (member (pam-service-name service)
(fprintd-configuration-pam-services config))
+ (pam-service
+ (inherit service)
+ (auth (cons (pam-entry
+ (control "sufficient")
+ (module (file-append fprintd
"/lib/security/pam_fprintd.so")))
+ (pam-service-auth service))))
+ service))))))
+
(define fprintd-service-type
(service-type (name 'fprintd)
(extensions
(list (service-extension dbus-root-service-type
fprintd-dbus-service)
(service-extension polkit-service-type
- fprintd-dbus-service)))
+ fprintd-dbus-service)
+ (service-extension pam-root-service-type
+ fprintd-pam-service)))
(default-value (fprintd-configuration))
(description
"Run fprintd, a fingerprint management daemon.")))
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 97cc378dfb9..4ae74f5c307 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -1316,7 +1316,8 @@ argument.")))
(unix-pam-service "gdm-password"
#:login-uid? #t
#:allow-empty-passwords?
- (gdm-configuration-allow-empty-passwords? config))))
+ (gdm-configuration-allow-empty-passwords? config))
+ (unix-pam-service "gdm-fingerprint")))
(define (gdm-shepherd-service config)
(define config-file