diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/certbot.scm | 22 | ||||
-rw-r--r-- | gnu/services/desktop.scm | 22 |
2 files changed, 36 insertions, 8 deletions
diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm index a2a200f032..7548145c98 100644 --- a/gnu/services/certbot.scm +++ b/gnu/services/certbot.scm @@ -26,6 +26,7 @@ #:use-module (gnu services web) #:use-module (gnu system shadow) #:use-module (gnu packages tls) + #:use-module (guix i18n) #:use-module (guix records) #:use-module (guix gexp) #:use-module (srfi srfi-1) @@ -113,14 +114,19 @@ #$(certbot-command config)))) (define (certbot-activation config) - (match config - (($ <certbot-configuration> package webroot certificates email - rsa-key-size default-location) - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - (mkdir-p #$webroot) - (zero? (system* #$(certbot-command config)))))))) + (let* ((certbot-directory "/var/lib/certbot") + (script (in-vicinity certbot-directory "renew-certificates")) + (message (format #f (G_ "~a may need to be run~%") script))) + (match config + (($ <certbot-configuration> package webroot certificates email + rsa-key-size default-location) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$webroot) + (mkdir-p #$certbot-directory) + (copy-file #$(certbot-command config) #$script) + (display #$message))))))) (define certbot-nginx-server-configurations (match-lambda diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 8972529179..517d5d3efe 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -94,6 +94,8 @@ xfce-desktop-service xfce-desktop-service-type + x11-socket-directory-service + %desktop-services)) ;;; Commentary: @@ -882,6 +884,24 @@ with the administrator's password." ;;; +;;; X11 socket directory service +;;; + +(define x11-socket-directory-service + ;; Return a service that creates /tmp/.X11-unix. When using X11, libxcb + ;; takes care of creating that directory. However, when using XWayland, we + ;; need to create beforehand. Thus, create it unconditionally here. + (simple-service 'x11-socket-directory + activation-service-type + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((directory "/tmp/.X11-unix")) + (mkdir-p directory) + (chmod directory #o777)))))) + + +;;; ;;; The default set of desktop services. ;;; @@ -912,6 +932,8 @@ with the administrator's password." (ntp-service) + x11-socket-directory-service + %base-services)) ;;; desktop.scm ends here |