diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/cups.scm | 3 | ||||
-rw-r--r-- | gnu/services/databases.scm | 4 | ||||
-rw-r--r-- | gnu/services/dbus.scm | 13 | ||||
-rw-r--r-- | gnu/services/desktop.scm | 20 | ||||
-rw-r--r-- | gnu/services/xorg.scm | 42 |
5 files changed, 70 insertions, 12 deletions
diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm index d965014cd8..2e86845e51 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 8e983ef0be..39225a4bd6 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/dbus.scm b/gnu/services/dbus.scm index ddb20bd0bb..85a4c3ec9a 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> @@ -301,10 +301,19 @@ tuples, are all set as environment variables when the bus daemon launches it." polkit-configuration make-polkit-configuration polkit-configuration? (polkit polkit-configuration-polkit ;file-like - (default polkit)) + (default %default-polkit)) (actions polkit-configuration-actions ;list of file-like (default '()))) +(define %default-polkit + ;; The default polkit package. + (let-system (system target) + ;; Since mozjs depends on Rust, which is currently x86_64-only, use + ;; polkit-duktape on other systems. + (if (string-prefix? "x86_64-" (or target system)) + polkit-mozjs + polkit-duktape))) + (define %polkit-accounts (list (user-group (name "polkitd") (system? #t)) (user-account diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 64d0e85301..c6761ca784 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014-2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> @@ -40,6 +40,7 @@ #:use-module (gnu services sound) #:use-module ((gnu system file-systems) #:select (%elogind-file-systems file-system)) + #:autoload (gnu services sddm) (sddm-service-type) #:use-module (gnu system) #:use-module (gnu system setuid) #:use-module (gnu system shadow) @@ -1021,7 +1022,7 @@ rules." (use-modules (guix build utils)) (let ((directory "/tmp/.X11-unix")) (mkdir-p directory) - (chmod directory #o777)))))) + (chmod directory #o1777)))))) ;;; ;;; Enlightenment desktop service. @@ -1187,9 +1188,17 @@ or setting its password with passwd."))) ;;; The default set of desktop services. ;;; -(define %desktop-services +(define* (desktop-services-for-system #:optional + (system (or (%current-target-system) + (%current-system)))) ;; List of services typically useful for a "desktop" use case. - (cons* (service gdm-service-type) + + ;; Since GDM depends on Rust (gdm -> gnome-shell -> gjs -> mozjs -> rust) + ;; and Rust is currently unavailable on non-x86_64 platforms, default to + ;; SDDM there (FIXME). + (cons* (if (string-prefix? "x86_64" system) + (service gdm-service-type) + (service sddm-service-type)) ;; Screen lockers are a pretty useful thing and these are small. (screen-locker-service slock) @@ -1248,4 +1257,7 @@ or setting its password with passwd."))) %base-services)) +(define-syntax %desktop-services + (identifier-syntax (desktop-services-for-system))) + ;;; desktop.scm ends here diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 47d50e48da..82a7d25602 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. ;;; @@ -48,6 +49,7 @@ #:use-module (gnu packages admin) #:use-module (gnu packages bash) #:use-module (gnu system shadow) + #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system trivial) #:use-module (guix gexp) #:use-module (guix store) @@ -869,6 +871,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 +903,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 +932,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 +1000,17 @@ 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 + "GDK_PIXBUF_MODULE_FILE=" + #$gnome-shell "/" #$%gdk-pixbuf-loaders-cache-file) + (string-append + "GDM_WAYLAND_SESSION=" + #$(gdm-configuration-wayland-session config)))))) (stop #~(make-kill-destructor)) (respawn? #t)))) |