aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/cups.scm3
-rw-r--r--gnu/services/databases.scm4
-rw-r--r--gnu/services/desktop.scm2
-rw-r--r--gnu/services/xorg.scm38
4 files changed, 40 insertions, 7 deletions
diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm
index 8bcb450ddf..3caa954579 100644
--- a/gnu/services/cups.scm
+++ b/gnu/services/cups.scm
@@ -419,6 +419,9 @@ queues. The URI @url{file:///dev/null} is always allowed.")
(string "lp")
"Specifies the group name or ID that will be used when executing external
programs.")
+ (log-file-group
+ (string "lpadmin")
+ "Specifies the group name or ID that will be used for log files.")
(log-file-perm
(string "0644")
"Specifies the permissions for all log files that the scheduler writes.")
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index eba88cdb68..8d266c1cba 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -116,7 +116,7 @@ host all all ::1/128 md5"))
(ident-file postgresql-config-file-ident-file
(default %default-postgres-ident))
(socket-directory postgresql-config-file-socket-directory
- (default #false))
+ (default "/var/run/postgresql"))
(extra-config postgresql-config-file-extra-config
(default '())))
@@ -364,7 +364,7 @@ and stores the database cluster in @var{data-directory}."
postgresql-role-configuration make-postgresql-role-configuration
postgresql-role-configuration?
(host postgresql-role-configuration-host ;string
- (default "/tmp"))
+ (default "/var/run/postgresql"))
(log postgresql-role-configuration-log ;string
(default "/var/log/postgresql_roles.log"))
(roles postgresql-role-configuration-roles
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 64d0e85301..612d548eea 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1021,7 +1021,7 @@ rules."
(use-modules (guix build utils))
(let ((directory "/tmp/.X11-unix"))
(mkdir-p directory)
- (chmod directory #o777))))))
+ (chmod directory #o1777))))))
;;;
;;; Enlightenment desktop service.
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index d5c5316d3f..a3ae578af8 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -869,6 +870,24 @@ the GNOME desktop environment.")
(apply execl (string-append #$dbus "/bin/dbus-daemon")
(program-arguments)))))
+;; Wrapper script for Wayland sessions, similar to Xsession.
+;;
+;; See `xinitrc`. By default, it launches the specified session through a
+;; login shell. With the default Guix configuration, this should source
+;; /etc/profile, setting up the Guix profile environment variables. However,
+;; gdm launches its own graphical session through the same method, so we need
+;; to ignore this case, since `gdm` doesn't have a login shell.
+(define gdm-wayland-session-wrapper
+ (program-file
+ "gdm-wayland-session-wrapper"
+ #~((let* ((user (getpw (getuid)))
+ (name (passwd:name user))
+ (shell (passwd:shell user))
+ (args (cdr (command-line))))
+ (if (string=? name "gdm")
+ (apply execl (cons (car args) args))
+ (execl shell shell "--login" "-c" (string-join args)))))))
+
(define-record-type* <gdm-configuration>
gdm-configuration make-gdm-configuration
gdm-configuration?
@@ -883,7 +902,10 @@ the GNOME desktop environment.")
(xorg-configuration gdm-configuration-xorg
(default (xorg-configuration)))
(x-session gdm-configuration-x-session
- (default (xinitrc))))
+ (default (xinitrc)))
+ (wayland? gdm-configuration-wayland? (default #f))
+ (wayland-session gdm-configuration-wayland-session
+ (default gdm-wayland-session-wrapper)))
(define (gdm-configuration-file config)
(mixed-text-file "gdm-custom.conf"
@@ -909,8 +931,9 @@ the GNOME desktop environment.")
;; See also
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39281>.
"InitialSetupEnable=false\n"
- ;; Enable me once X is working.
- "WaylandEnable=false\n"
+ "WaylandEnable=" (if (gdm-configuration-wayland? config)
+ "true"
+ "false") "\n"
"\n"
"[debug]\n"
"Enable=" (if (gdm-configuration-debug? config)
@@ -976,7 +999,14 @@ the GNOME desktop environment.")
;; can depend on GNOME Shell directly.
(cons #$gnome-shell
'#$(gdm-configuration-gnome-shell-assets
- config)))))))))
+ config)))))
+ ;; Add XCURSOR_PATH so that mutter can find its
+ ;; cursors. gdm doesn't login so doesn't source
+ ;; the corresponding line in /etc/profile.
+ "XCURSOR_PATH=/run/current-system/profile/share/icons"
+ (string-append
+ "GDM_WAYLAND_SESSION="
+ #$(gdm-configuration-wayland-session config))))))
(stop #~(make-kill-destructor))
(respawn? #t))))