guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 3ee8ffb3ddf6b0ba17cdd5ad2be3510cc525dbc9
Author: Yelninei <[email protected]>
AuthorDate: Thu Aug 13 17:44:47 2026 +0000

    services: Add hurd-login-service-type.
    
    * gnu/services/hurd.scm (<hurd-login-accounts>): New record.
      (hurd-login-accounts): New procedure.
      (hurd-login-service-type): Add accounts-service-type extension.
    
    Merges: https://codeberg.org/guix/guix/pulls/10548
    Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
 gnu/services/hurd.scm | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm
index 5cf37adeaf..1ee38e8cd0 100644
--- a/gnu/services/hurd.scm
+++ b/gnu/services/hurd.scm
@@ -22,12 +22,16 @@
   #:use-module (gnu services)
   #:use-module (gnu services shepherd)
   #:use-module (gnu system)
+  #:use-module (gnu system shadow)
   #:use-module (guix gexp)
   #:use-module (guix records)
   #:export (hurd-console-configuration
             hurd-console-service-type
             hurd-getty-configuration
-            hurd-getty-service-type))
+            hurd-getty-service-type
+
+            hurd-login-configuration
+            hurd-login-service-type))
 
 ;;; Commentary:
 ;;;
@@ -115,4 +119,36 @@
    (description
     "Provide console login using the Hurd @command{getty} program.")))
 
+;;;
+;;; Hurd login service
+;;;
+
+(define-record-type* <hurd-login-configuration>
+  hurd-login-configuration make-hurd-login-configuration
+  hurd-login-configuration?
+  (hurd hurd-login-configuration-hurd   ;file-like
+        (default hurd)))
+
+(define (hurd-login-accounts config)
+  (let ((hurd (hurd-login-configuration-hurd config)))
+    (list (user-group
+           (name "login")
+           (system? #t))
+          (user-account
+           (name "login")
+           (group "login")
+           (system? #t)
+           (comment "login user")
+           (home-directory "/etc/login")
+           (shell (file-append hurd "/bin/loginpr"))))))
+
+(define hurd-login-service-type
+  (service-type
+   (name 'login)
+   (extensions (list (service-extension account-service-type
+                                        hurd-login-accounts)))
+   (description
+    "Provide the login user for use by the Hurd @command{login} command.")
+   (default-value (hurd-login-configuration))))
+
 ;;; hurd.scm ends here

Reply via email to