aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2024-01-07 18:31:32 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2024-01-07 18:31:32 +0100
commit2cbb1a6e1e2679c7db74b6b906d223fb3661d09f (patch)
treeab4101e769bbac1d53950004044fd297223b9492 /gnu/services
parentb369dc272eeba4eafb2bc7dc56f7b3cf09fb0961 (diff)
parentb212e6934643e085f168a5364cb593f61aa616ba (diff)
downloadguix-2cbb1a6e1e2679c7db74b6b906d223fb3661d09f.tar
guix-2cbb1a6e1e2679c7db74b6b906d223fb3661d09f.tar.gz
Merge branch 'master' into gnome-team
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm4
-rw-r--r--gnu/services/docker.scm12
-rw-r--r--gnu/services/shepherd.scm21
-rw-r--r--gnu/services/xorg.scm15
4 files changed, 30 insertions, 22 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 0e3f600128..2340cf1696 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1803,9 +1803,9 @@ archive' public keys, with GUIX."
(chroot-directories guix-configuration-chroot-directories ;list of file-like/strings
(default '()))
(max-silent-time guix-configuration-max-silent-time ;integer
- (default 0))
+ (default 3600))
(timeout guix-configuration-timeout ;integer
- (default 0))
+ (default (* 3600 24)))
(log-compression guix-configuration-log-compression
(default 'gzip))
(discover? guix-configuration-discover?
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index 72ef7d74db..4d32b96847 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -61,6 +61,8 @@
oci-container-service-type
oci-container-shepherd-service))
+(define-maybe file-like)
+
(define-configuration docker-configuration
(docker
(file-like docker)
@@ -87,6 +89,9 @@ loop-back communications.")
(environment-variables
(list '())
"Environment variables to set for dockerd")
+ (config-file
+ (maybe-file-like)
+ "JSON configuration file to pass to dockerd")
(no-serialization))
(define %docker-accounts
@@ -131,7 +136,8 @@ loop-back communications.")
(enable-iptables? (docker-configuration-enable-iptables? config))
(environment-variables (docker-configuration-environment-variables config))
(proxy (docker-configuration-proxy config))
- (debug? (docker-configuration-debug? config)))
+ (debug? (docker-configuration-debug? config))
+ (config-file (docker-configuration-config-file config)))
(shepherd-service
(documentation "Docker daemon.")
(provision '(dockerd))
@@ -144,6 +150,10 @@ loop-back communications.")
(start #~(make-forkexec-constructor
(list (string-append #$docker "/bin/dockerd")
"-p" "/var/run/docker.pid"
+ #$@(if (not (eq? config-file %unset-value))
+ (list #~(string-append
+ "--config-file=" #$config-file))
+ '())
#$@(if debug?
'("--debug" "--log-level=debug")
'())
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index e9d3a631c2..8e122f1aab 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2016, 2018-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2016, 2018-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -371,17 +371,6 @@ as shepherd package."
(use-modules (srfi srfi-34)
(system repl error-handling))
- (define (call-with-file file flags proc)
- (let ((port #f))
- (dynamic-wind
- (lambda ()
- (set! port (open file flags)))
- (lambda ()
- (proc port))
- (lambda ()
- (close-port port)
- (set! port #f)))))
-
;; There's code run from shepherd that uses 'call-with-input-file' &
;; co.--e.g., the 'urandom-seed' service. Starting from Shepherd
;; 0.9.2, users need to make sure not to leak non-close-on-exec file
@@ -389,12 +378,12 @@ as shepherd package."
;; standard bindings with O_CLOEXEC variants.
(set! call-with-input-file
(lambda (file proc)
- (call-with-file file (logior O_RDONLY O_CLOEXEC)
- proc)))
+ (call-with-port (open file (logior O_RDONLY O_CLOEXEC))
+ proc)))
(set! call-with-output-file
(lambda (file proc)
- (call-with-file file (logior O_WRONLY O_CREAT O_CLOEXEC)
- proc)))
+ (call-with-port (open file (logior O_WRONLY O_CREAT O_CLOEXEC))
+ proc)))
;; Specify the default environment visible to all the services.
;; Without this statement, all the environment variables of PID 1
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index f8cf9f25b6..1ee15ea90c 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -981,6 +981,11 @@ argument.")))
(lambda (pw)
(string-append (passwd:dir pw) "/.guix-profile"))))
+ (define home-profile
+ (and=> (getpw (getuid))
+ (lambda (pw)
+ (string-append (passwd:dir pw) "/.guix-home/profile"))))
+
;; If we are able to find the user's profile, we can add it to
;; the search paths set below. We need to do this so that D-Bus
;; can start services installed by the user. This allows
@@ -988,9 +993,13 @@ argument.")))
;; 'evolution') to work even if those services are only available
;; in the user's profile. See <https://bugs.gnu.org/35267>.
(define profiles
- (if user-profile
- (list user-profile system-profile)
- (list system-profile)))
+ (append (if home-profile
+ (list home-profile)
+ '())
+ (if user-profile
+ (list user-profile)
+ '())
+ (list system-profile)))
(setenv "XDG_CONFIG_DIRS"
(string-join (map (cut string-append <> "/etc/xdg") profiles)