summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-11-17 23:24:42 +0100
committerLudovic Courtès <ludo@gnu.org>2021-11-17 23:43:14 +0100
commit3a317f7476f8c6012e166ff9f340f861938721c9 (patch)
tree946e398c37912cfc03be7306951ae87bfeb130fa /gnu/services
parente55547bf70384691712047912c793c517debd2ec (diff)
parent62e707d67caf1dab2af411a69ff8cec4b2dc686e (diff)
downloadguix-patches-3a317f7476f8c6012e166ff9f340f861938721c9.tar
guix-patches-3a317f7476f8c6012e166ff9f340f861938721c9.tar.gz
Merge branch 'master' into core-updates-frozen
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/cups.scm4
-rw-r--r--gnu/services/ssh.scm11
-rw-r--r--gnu/services/virtualization.scm48
-rw-r--r--gnu/services/web.scm10
4 files changed, 68 insertions, 5 deletions
diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm
index 3caa954579..a9eeb3868b 100644
--- a/gnu/services/cups.scm
+++ b/gnu/services/cups.scm
@@ -705,7 +705,7 @@ in seconds. Set to 0 to disable cancellation of \"stuck\" jobs.")
"Specifies the maximum size of the log files before they are rotated, in
bytes. The value 0 disables log rotation.")
(multiple-operation-timeout
- (non-negative-integer 300)
+ (non-negative-integer 900)
"Specifies the maximum amount of time to allow between files in a multiple
file print job, in seconds.")
(page-log-format
@@ -850,7 +850,7 @@ protocol version to TLS v1.1.")
"Specifies whether the scheduler requires clients to strictly adhere to the
IPP specifications.")
(timeout
- (non-negative-integer 300)
+ (non-negative-integer 900)
"Specifies the HTTP request timeout, in seconds.")
(web-interface?
(boolean #f)
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index a018052eeb..e7bc6100f6 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -39,6 +39,7 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
+ #:use-module (ice-9 vlist)
#:export (lsh-configuration
lsh-configuration?
lsh-service
@@ -535,7 +536,15 @@ of user-name/file-like tuples."
(openssh-configuration
(inherit config)
(authorized-keys
- (append (openssh-authorized-keys config) keys))))
+ (match (openssh-authorized-keys config)
+ (((users _ ...) ...)
+ ;; Build a user/key-list mapping.
+ (let ((user-keys (alist->vhash (openssh-authorized-keys config))))
+ ;; Coalesce the key lists associated with each user.
+ (map (lambda (user)
+ `(,user
+ ,@(concatenate (vhash-fold* cons '() user user-keys))))
+ users)))))))
(define openssh-service-type
(service-type (name 'openssh)
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index bca5f56b87..1a5744ffbf 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2017 Ryan Moe <ryan.moe@gmail.com>
;;; Copyright © 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Timotej Lazar <timotej.lazar@araneo.si>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -82,7 +83,11 @@
qemu-binfmt-configuration
qemu-binfmt-configuration?
- qemu-binfmt-service-type))
+ qemu-binfmt-service-type
+
+ qemu-guest-agent-configuration
+ qemu-guest-agent-configuration?
+ qemu-guest-agent-service-type))
(define (uglify-field-name field-name)
(let ((str (symbol->string field-name)))
@@ -849,6 +854,47 @@ functionality of the kernel Linux.")))
;;;
+;;; QEMU guest agent service.
+;;;
+
+(define-configuration qemu-guest-agent-configuration
+ (qemu
+ (package qemu-minimal)
+ "QEMU package.")
+ (device
+ (string "")
+ "Path to device or socket used to communicate with the host. If not
+specified, the QEMU default path is used."))
+
+(define qemu-guest-agent-shepherd-service
+ (match-lambda
+ (($ <qemu-guest-agent-configuration> qemu device)
+ (list
+ (shepherd-service
+ (provision '(qemu-guest-agent))
+ (documentation "Run the QEMU guest agent.")
+ (start #~(make-forkexec-constructor
+ `(,(string-append #$qemu "/bin/qemu-ga") "--daemon"
+ "--pidfile=/var/run/qemu-ga.pid"
+ "--statedir=/var/run"
+ ,@(if #$device
+ (list (string-append "--path=" #$device))
+ '()))
+ #:pid-file "/var/run/qemu-ga.pid"
+ #:log-file "/var/log/qemu-ga.log"))
+ (stop #~(make-kill-destructor)))))))
+
+(define qemu-guest-agent-service-type
+ (service-type
+ (name 'qemu-guest-agent)
+ (extensions
+ (list (service-extension shepherd-root-service-type
+ qemu-guest-agent-shepherd-service)))
+ (default-value (qemu-guest-agent-configuration))
+ (description "Run the QEMU guest agent.")))
+
+
+;;;
;;; Secrets for guest VMs.
;;;
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index bb42eacf83..f1c3a2f75e 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -1110,7 +1110,9 @@ a webserver.")
(package hpcguix-web-package (default hpcguix-web)) ;<package>
;; Specs is gexp of hpcguix-web configuration file
- (specs hpcguix-web-configuration-specs))
+ (specs hpcguix-web-configuration-specs)
+ (address hpcguix-web-configuration-address (default "127.0.0.1"))
+ (port hpcguix-web-configuration-port (default 5000)))
(define %hpcguix-web-accounts
(list (user-group
@@ -1163,6 +1165,12 @@ a webserver.")
(requirement '(networking))
(start #~(make-forkexec-constructor
(list #$(file-append hpcguix-web "/bin/hpcguix-web")
+ (string-append "--listen="
+ #$(hpcguix-web-configuration-address
+ config))
+ "-p"
+ #$(number->string
+ (hpcguix-web-configuration-port config))
(string-append "--config="
#$(scheme-file "hpcguix-web.scm" specs)))
#:user "hpcguix-web"