aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorTomas Volf <~@wolfsden.cz>2024-12-13 17:27:44 +0100
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-12-15 00:19:41 +0900
commit7068f6f7a5a53a29e9650b097924246cf0d445b4 (patch)
tree57d034e5c25cf31a61544b90ceebd513efcbd3dd /gnu/services
parentb8d72efbb14637a9242168b4ceafdd6864895ff2 (diff)
downloadguix-7068f6f7a5a53a29e9650b097924246cf0d445b4.tar.gz
guix-7068f6f7a5a53a29e9650b097924246cf0d445b4.zip
services: mingetty: Add additional configuration options.
Not all aspects of mingetty were configurable, so this commit adds the additional configuration fields to support that. * gnu/services/base.scm (<mingetty-configuration>): Add delay, print-issue, print-hostname, nice, working-directory, root-directory fields. (mingetty-shepherd-service): Use the new fields. (define-module)<#:export>: Export the new accessors. * doc/guix.texi (Base Services)<mingetty-configuration>: Document the additional field. Change-Id: I4557a82498805ade0b341feda9d33eccc305690f
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm72
1 files changed, 59 insertions, 13 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 6473e1a91a..798356ed84 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -187,6 +187,12 @@
mingetty-configuration-login-pause?
mingetty-configuration-clear-on-logout?
mingetty-configuration-mingetty
+ mingetty-configuration-delay
+ mingetty-configuration-print-issue
+ mingetty-configuration-print-hostname
+ mingetty-configuration-nice
+ mingetty-configuration-working-directory
+ mingetty-configuration-root-directory
mingetty-configuration?
mingetty-service ; deprecated
mingetty-service-type
@@ -1240,22 +1246,36 @@ the tty to run, among other things."
(define-record-type* <mingetty-configuration>
mingetty-configuration make-mingetty-configuration
mingetty-configuration?
- (mingetty mingetty-configuration-mingetty ;file-like
- (default mingetty))
- (tty mingetty-configuration-tty) ;string
- (auto-login mingetty-auto-login ;string | #f
- (default #f))
- (login-program mingetty-login-program ;gexp
- (default #f))
- (login-pause? mingetty-login-pause? ;Boolean
- (default #f))
- (clear-on-logout? mingetty-clear-on-logout? ;Boolean
- (default #t)))
+ (mingetty mingetty-configuration-mingetty ;file-like
+ (default mingetty))
+ (tty mingetty-configuration-tty) ;string
+ (auto-login mingetty-auto-login ;string | #f
+ (default #f))
+ (login-program mingetty-login-program ;gexp
+ (default #f))
+ (login-pause? mingetty-login-pause? ;Boolean
+ (default #f))
+ (clear-on-logout? mingetty-clear-on-logout? ;Boolean
+ (default #t))
+ (delay mingetty-configuration-delay ;Integer | #f
+ (default #f))
+ (print-issue mingetty-configuration-print-issue ;Boolean | Symbol
+ (default #t))
+ (print-hostname mingetty-configuration-print-hostname ;Boolean | Symbol
+ (default #t))
+ (nice mingetty-configuration-nice ;Integer | #f
+ (default #f))
+ (working-directory mingetty-configuration-working-directory ;String | #f
+ (default #f))
+ (root-directory mingetty-configuration-root-directory ;String | #f
+ (default #f)))
(define (mingetty-shepherd-service config)
(match-record config <mingetty-configuration>
- (mingetty tty auto-login login-program
- login-pause? clear-on-logout?)
+ ( mingetty tty auto-login login-program
+ login-pause? clear-on-logout? delay
+ print-issue print-hostname nice
+ working-directory root-directory)
(list
(shepherd-service
(documentation "Run mingetty on an tty.")
@@ -1286,6 +1306,32 @@ the tty to run, among other things."
#~())
#$@(if login-pause?
#~("--loginpause")
+ #~())
+ #$@(if delay
+ #~("--delay" #$(number->string delay))
+ #~())
+ #$@(match print-issue
+ (#t
+ #~())
+ ('no-nl
+ #~("--nonewline"))
+ (#f
+ #~("--noissue")))
+ #$@(match print-hostname
+ (#t
+ #~())
+ ('long
+ #~("--long-hostname"))
+ (#f
+ #~("--nohostname")))
+ #$@(if nice
+ #~("--nice" #$(number->string nice))
+ #~())
+ #$@(if working-directory
+ #~("--chdir" #$working-directory)
+ #~())
+ #$@(if root-directory
+ #~("--chroot" #$root-directory)
#~()))))
(stop #~(make-kill-destructor))))))