From 5ac5f2c1298cac811a544e2db193ba5d69d9fce6 Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Sun, 20 Oct 2019 23:12:02 +0900 Subject: services: sddm: Add default configuration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unlike gdm-service-type, sddm-service-type cannot be configured in an operating-system configuration by simply adding (service sddm-service-type). This adds the default SDDM configuration just like GDM does.. * gnu/services/sddm.scm (sddm-service-type)[default-value]: New field. Signed-off-by: Ludovic Courtès --- gnu/services/sddm.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm index b0e6d40260..f33f1f93b9 100644 --- a/gnu/services/sddm.scm +++ b/gnu/services/sddm.scm @@ -316,7 +316,8 @@ Relogin=" (if (sddm-configuration-relogin? config) (service-extension account-service-type (const %sddm-accounts)) (service-extension profile-service-type - sddm-profile-service))))) + sddm-profile-service))) + (default-value (sddm-configuration)))) (define* (sddm-service #:optional (config (sddm-configuration))) "Run the @uref{https://github.com/sddm/sddm,SSDM display manager} -- cgit v1.2.3 From 8cf3e167c15a0dba3166cbeee46d41f26cbf75f1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 21 Oct 2019 15:47:55 +0200 Subject: services: sddm: Deprecate 'sddm-service' procedure. * gnu/services/sddm.scm (sddm-service): Mark as deprecated. * doc/guix.texi (X Window): Document 'sddm-service-type' and 'sddm-configuration'. --- doc/guix.texi | 45 ++++++++++++++++++++++++++++++++++++--------- gnu/services/sddm.scm | 4 +++- 2 files changed, 39 insertions(+), 10 deletions(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index 6eccbb971f..15b6ff04c3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14193,16 +14193,43 @@ Relogin after logout. @cindex login manager @cindex X11 login -@deffn {Scheme Procedure} sddm-service config -Return a service that spawns the SDDM graphical login manager for config of -type @code{}. +@defvr {Scheme Variable} sddm-service-type +This is the type of the service to run the +@uref{https://github.com/sddm/sddm,SSDM display manager}. Its value +must be a @code{sddm-configuration} record (see below). -@example - (sddm-service (sddm-configuration - (auto-login-user "Alice") - (auto-login-session "xfce.desktop"))) -@end example -@end deffn +Here's an example use: + +@lisp +(service sddm-service-type + (sddm-configuration + (auto-login-user "alice") + (auto-login-session "xfce.desktop"))) +@end lisp +@end defvr + +@deftp {Data Type} sddm-configuration +This data type represents the configuration of the SDDM login manager. +The available fields are: + +@table @asis +@item @code{sddm} (default: @code{sddm}) +The SDDM package to use. + +@item @code{display-server} (default: @code{"x11"}) +This must be either @code{"x11"} or @code{"wayland"}. + +@c FIXME: Add more fields. + +@item @code{auto-login-user} (default: @code{""}) +If non-empty, this is the user account under which to log in +automatically. + +@item @code{auto-login-session} (default: @code{""}) +If non-empty, this is the @file{.desktop} file name to use as the +auto-login session. +@end table +@end deftp @cindex Xorg, configuration @deftp {Data Type} xorg-configuration diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm index f33f1f93b9..c89c0c68bc 100644 --- a/gnu/services/sddm.scm +++ b/gnu/services/sddm.scm @@ -30,6 +30,7 @@ #:use-module (gnu system shadow) #:use-module (guix gexp) #:use-module (guix records) + #:use-module (guix deprecation) #:export (sddm-configuration sddm-configuration? sddm-service-type @@ -319,7 +320,8 @@ Relogin=" (if (sddm-configuration-relogin? config) sddm-profile-service))) (default-value (sddm-configuration)))) -(define* (sddm-service #:optional (config (sddm-configuration))) +(define-deprecated (sddm-service #:optional (config (sddm-configuration))) + sddm-service-type "Run the @uref{https://github.com/sddm/sddm,SSDM display manager} with the given @var{config}, a @code{} object." (service sddm-service-type config)) -- cgit v1.2.3 From cfe8d8063b5d79fc91eb757c2020244e239b77b3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 21 Oct 2019 15:58:48 +0200 Subject: services: sddm: Add description. * gnu/services/sddm.scm (sddm-service-type)[description]: New field. --- gnu/services/sddm.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm index c89c0c68bc..ac8c9a8403 100644 --- a/gnu/services/sddm.scm +++ b/gnu/services/sddm.scm @@ -318,7 +318,10 @@ Relogin=" (if (sddm-configuration-relogin? config) (const %sddm-accounts)) (service-extension profile-service-type sddm-profile-service))) - (default-value (sddm-configuration)))) + (default-value (sddm-configuration)) + (description + "Run SDDM, a display and log-in manager for X11 and +Wayland."))) (define-deprecated (sddm-service #:optional (config (sddm-configuration))) sddm-service-type -- cgit v1.2.3 From 5f15b422738d09072c866ef17fd6988a3c84a468 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 21 Oct 2019 16:10:33 +0200 Subject: services: agetty: Really import (gnu build linux-boot). This is a followup to commit 62c2217570fb3a3437e8316d3679b7fe13db0884. * gnu/services/base.scm (agetty-shepherd-service)[start]: Wrap un 'with-imported-modules'. This fixes a build error when TTY is true ("no code for module (gnu build linux-boot)"). --- gnu/services/base.scm | 229 +++++++++++++++++++++++++------------------------- 1 file changed, 116 insertions(+), 113 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index e75c56828e..b1eff89ecc 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -990,7 +990,6 @@ to use as the tty. This is primarily useful for headless systems." erase-characters kill-characters chdir delay nice extra-options) (list (shepherd-service - (modules '((ice-9 match) (gnu build linux-boot))) (documentation "Run agetty on a tty.") (provision (list (symbol-append 'term- (string->symbol (or tty "auto"))))) @@ -1000,122 +999,126 @@ to use as the tty. This is primarily useful for headless systems." ;; mingetty-shepherd-service). (requirement '(user-processes host-name udev)) - (start #~(lambda args - (let ((defaulted-tty #$(or tty (default-serial-port)))) - (apply - (if defaulted-tty - (make-forkexec-constructor - (list #$(file-append util-linux "/sbin/agetty") - #$@extra-options - #$@(if eight-bits? - #~("--8bits") - #~()) - #$@(if no-reset? - #~("--noreset") - #~()) - #$@(if remote? - #~("--remote") - #~()) - #$@(if flow-control? - #~("--flow-control") - #~()) - #$@(if host - #~("--host" #$host) - #~()) - #$@(if no-issue? - #~("--noissue") - #~()) - #$@(if init-string - #~("--init-string" #$init-string) - #~()) - #$@(if no-clear? - #~("--noclear") - #~()) + (modules '((ice-9 match) (gnu build linux-boot))) + (start + (with-imported-modules (source-module-closure + '((gnu build linux-boot))) + #~(lambda args + (let ((defaulted-tty #$(or tty (default-serial-port)))) + (apply + (if defaulted-tty + (make-forkexec-constructor + (list #$(file-append util-linux "/sbin/agetty") + #$@extra-options + #$@(if eight-bits? + #~("--8bits") + #~()) + #$@(if no-reset? + #~("--noreset") + #~()) + #$@(if remote? + #~("--remote") + #~()) + #$@(if flow-control? + #~("--flow-control") + #~()) + #$@(if host + #~("--host" #$host) + #~()) + #$@(if no-issue? + #~("--noissue") + #~()) + #$@(if init-string + #~("--init-string" #$init-string) + #~()) + #$@(if no-clear? + #~("--noclear") + #~()) ;;; FIXME This doesn't work as expected. According to agetty(8), if this option ;;; is not passed, then the default is 'auto'. However, in my tests, when that ;;; option is selected, agetty never presents the login prompt, and the ;;; term-ttyS0 service respawns every few seconds. - #$@(if local-line - #~(#$(match local-line - ('auto "--local-line=auto") - ('always "--local-line=always") - ('never "-local-line=never"))) - #~()) - #$@(if tty - #~() - #~("--keep-baud")) - #$@(if extract-baud? - #~("--extract-baud") - #~()) - #$@(if skip-login? - #~("--skip-login") - #~()) - #$@(if no-newline? - #~("--nonewline") - #~()) - #$@(if login-options - #~("--login-options" #$login-options) - #~()) - #$@(if chroot - #~("--chroot" #$chroot) - #~()) - #$@(if hangup? - #~("--hangup") - #~()) - #$@(if keep-baud? - #~("--keep-baud") - #~()) - #$@(if timeout - #~("--timeout" #$(number->string timeout)) - #~()) - #$@(if detect-case? - #~("--detect-case") - #~()) - #$@(if wait-cr? - #~("--wait-cr") - #~()) - #$@(if no-hints? - #~("--nohints?") - #~()) - #$@(if no-hostname? - #~("--nohostname") - #~()) - #$@(if long-hostname? - #~("--long-hostname") - #~()) - #$@(if erase-characters - #~("--erase-chars" #$erase-characters) - #~()) - #$@(if kill-characters - #~("--kill-chars" #$kill-characters) - #~()) - #$@(if chdir - #~("--chdir" #$chdir) - #~()) - #$@(if delay - #~("--delay" #$(number->string delay)) - #~()) - #$@(if nice - #~("--nice" #$(number->string nice)) - #~()) - #$@(if auto-login - (list "--autologin" auto-login) - '()) - #$@(if login-program - #~("--login-program" #$login-program) - #~()) - #$@(if login-pause? - #~("--login-pause") - #~()) - defaulted-tty - #$@(if baud-rate - #~(#$baud-rate) - #~()) - #$@(if term - #~(#$term) - #~()))) - (const #f)) ; never start. - args)))) + #$@(if local-line + #~(#$(match local-line + ('auto "--local-line=auto") + ('always "--local-line=always") + ('never "-local-line=never"))) + #~()) + #$@(if tty + #~() + #~("--keep-baud")) + #$@(if extract-baud? + #~("--extract-baud") + #~()) + #$@(if skip-login? + #~("--skip-login") + #~()) + #$@(if no-newline? + #~("--nonewline") + #~()) + #$@(if login-options + #~("--login-options" #$login-options) + #~()) + #$@(if chroot + #~("--chroot" #$chroot) + #~()) + #$@(if hangup? + #~("--hangup") + #~()) + #$@(if keep-baud? + #~("--keep-baud") + #~()) + #$@(if timeout + #~("--timeout" #$(number->string timeout)) + #~()) + #$@(if detect-case? + #~("--detect-case") + #~()) + #$@(if wait-cr? + #~("--wait-cr") + #~()) + #$@(if no-hints? + #~("--nohints?") + #~()) + #$@(if no-hostname? + #~("--nohostname") + #~()) + #$@(if long-hostname? + #~("--long-hostname") + #~()) + #$@(if erase-characters + #~("--erase-chars" #$erase-characters) + #~()) + #$@(if kill-characters + #~("--kill-chars" #$kill-characters) + #~()) + #$@(if chdir + #~("--chdir" #$chdir) + #~()) + #$@(if delay + #~("--delay" #$(number->string delay)) + #~()) + #$@(if nice + #~("--nice" #$(number->string nice)) + #~()) + #$@(if auto-login + (list "--autologin" auto-login) + '()) + #$@(if login-program + #~("--login-program" #$login-program) + #~()) + #$@(if login-pause? + #~("--login-pause") + #~()) + defaulted-tty + #$@(if baud-rate + #~(#$baud-rate) + #~()) + #$@(if term + #~(#$term) + #~()))) + (const #f)) ; never start. + args))))) (stop #~(make-kill-destructor))))))) (define agetty-service-type -- cgit v1.2.3 From 84261a233ecb58d7a622329d95a8d0d3fc92f886 Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Thu, 10 Oct 2019 18:38:36 +0200 Subject: services: inputattach: Add 'baud-rate' parameter. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/desktop.scm (inputattach-configuration): Add baud-rate field. (inputattach-shepherd-service): Add baud-rate to parameters when specified. * doc/guix.texi (Miscellaneous Services): [inputattach Service] Document baud-rate parameter. Signed-off-by: Ludovic Courtès --- doc/guix.texi | 4 ++++ gnu/services/desktop.scm | 30 ++++++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index 15b6ff04c3..b550b1c34a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -24573,6 +24573,10 @@ The type of device to connect to. Run @command{inputattach --help}, from the @item @code{device} (default: @code{"/dev/ttyS0"}) The device file to connect to the device. +@item @code{baud-rate} (default: @code{#f}) +Baud rate to use for the serial connection. +Should be a number or @code{#f}. + @item @code{log-file} (default: @code{#f}) If true, this must be the name of a file to log messages to. @end table diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5a7f8be4bb..08acb79ed6 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1028,23 +1028,29 @@ as expected."))) (default "wacom")) (device inputattach-configuration-device (default "/dev/ttyS0")) + (baud-rate inputattach-configuration-baud-rate + (default #f)) (log-file inputattach-configuration-log-file (default #f))) (define inputattach-shepherd-service (match-lambda - (($ type device log-file) - (list (shepherd-service - (provision '(inputattach)) - (requirement '(udev)) - (documentation "inputattach daemon") - (start #~(make-forkexec-constructor - (list (string-append #$inputattach - "/bin/inputattach") - (string-append "--" #$type) - #$device) - #:log-file #$log-file)) - (stop #~(make-kill-destructor))))))) + (($ type device baud-rate log-file) + (let ((args (append (if baud-rate + (list "--baud-rate" (number->string baud-rate)) + '()) + (list (string-append "--" type) + device)))) + (list (shepherd-service + (provision '(inputattach)) + (requirement '(udev)) + (documentation "inputattach daemon") + (start #~(make-forkexec-constructor + (cons (string-append #$inputattach + "/bin/inputattach") + (quote #$args)) + #:log-file #$log-file)) + (stop #~(make-kill-destructor)))))))) (define inputattach-service-type (service-type -- cgit v1.2.3 From 00850bb836e1027edb310f3dc69b897f031e23e0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 22 Oct 2019 17:29:35 +0200 Subject: services: elogind, gnome, mate, xfce: Fix config type predicate identifiers. * gnu/services/desktop.scm (): Add question mark in type predicate identifier. (): Likewise. (): Likewise. (): Likewise. --- gnu/services/desktop.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 08acb79ed6..449b606a31 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -580,7 +580,7 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks." (define-record-type* elogind-configuration make-elogind-configuration - elogind-configuration + elogind-configuration? (elogind elogind-package (default elogind)) (kill-user-processes? elogind-kill-user-processes? @@ -834,7 +834,7 @@ accountsservice web site} for more information." (define-record-type* gnome-desktop-configuration make-gnome-desktop-configuration - gnome-desktop-configuration + gnome-desktop-configuration? (gnome-package gnome-package (default gnome))) (define (gnome-polkit-settings config) @@ -872,7 +872,7 @@ and extends polkit with the actions from @code{gnome-settings-daemon}." (define-record-type* mate-desktop-configuration make-mate-desktop-configuration - mate-desktop-configuration + mate-desktop-configuration? (mate-package mate-package (default mate))) (define mate-desktop-service-type @@ -905,7 +905,7 @@ and extends polkit with the actions from @code{mate-settings-daemon}." (define-record-type* xfce-desktop-configuration make-xfce-desktop-configuration - xfce-desktop-configuration + xfce-desktop-configuration? (xfce xfce-package (default xfce))) (define (xfce-polkit-settings config) -- cgit v1.2.3