services: gdm: Remove etc service.
* gnu/packages/gnome.scm (gdm)[arguments]: Update pre-configure phase to make GDM get the configuration file path from an environment variable. * gnu/services/xorg.scm (gdm-etc-service): Remove function. (gdm-configuration-file): New function. (gdm-shepherd-service): Set GDM_CUSTOM_CONF before invoking GDM. (gdm-service-type)[extensions]: Remove etc-service-type extension. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
7af417502c
commit
e57c2adb2a
2 changed files with 39 additions and 37 deletions
|
@ -32,7 +32,7 @@
|
||||||
;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
|
;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
|
||||||
;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
|
;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
|
||||||
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
|
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
|
||||||
;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
|
;;; Copyright © 2018, 2019 Timothy Sample <samplet@ngyro.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -5462,6 +5462,9 @@ libxml2.")
|
||||||
;; processes.
|
;; processes.
|
||||||
"gdm_session_set_environment_variable (self, \"GDM_X_SERVER\",\n"
|
"gdm_session_set_environment_variable (self, \"GDM_X_SERVER\",\n"
|
||||||
" g_getenv (\"GDM_X_SERVER\"));\n"
|
" g_getenv (\"GDM_X_SERVER\"));\n"
|
||||||
|
;; Propagate the GDM_CUSTOM_CONF environment variable.
|
||||||
|
"gdm_session_set_environment_variable (self, \"GDM_CUSTOM_CONF\",\n"
|
||||||
|
" g_getenv (\"GDM_CUSTOM_CONF\"));\n"
|
||||||
;; FIXME: Really glib should be declaring XDG_CONFIG_DIRS as a
|
;; FIXME: Really glib should be declaring XDG_CONFIG_DIRS as a
|
||||||
;; variable, but it doesn't do that right now. Anyway
|
;; variable, but it doesn't do that right now. Anyway
|
||||||
;; /run/current-system/profile/share/gnome-session/sessions/gnome.desktop
|
;; /run/current-system/profile/share/gnome-session/sessions/gnome.desktop
|
||||||
|
@ -5481,7 +5484,9 @@ libxml2.")
|
||||||
;; Look for custom GDM conf in /run/current-system.
|
;; Look for custom GDM conf in /run/current-system.
|
||||||
(substitute* '("common/gdm-settings-desktop-backend.c")
|
(substitute* '("common/gdm-settings-desktop-backend.c")
|
||||||
(("GDM_CUSTOM_CONF")
|
(("GDM_CUSTOM_CONF")
|
||||||
"\"/run/current-system/etc/gdm/custom.conf\""))
|
(string-append "(g_getenv(\"GDM_CUSTOM_CONF\") != NULL"
|
||||||
|
" ? g_getenv(\"GDM_CUSTOM_CONF\")"
|
||||||
|
" : GDM_CUSTOM_CONF)")))
|
||||||
;; Use service-supplied path to X.
|
;; Use service-supplied path to X.
|
||||||
(substitute* '("daemon/gdm-server.c")
|
(substitute* '("daemon/gdm-server.c")
|
||||||
(("\\(X_SERVER X_SERVER_ARG_FORMAT")
|
(("\\(X_SERVER X_SERVER_ARG_FORMAT")
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
|
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
|
||||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||||
;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
|
;;; Copyright © 2018, 2019 Timothy Sample <samplet@ngyro.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -633,38 +633,34 @@ makes the good ol' XlockMore usable."
|
||||||
(x-server gdm-configuration-x-server
|
(x-server gdm-configuration-x-server
|
||||||
(default (xorg-wrapper))))
|
(default (xorg-wrapper))))
|
||||||
|
|
||||||
(define (gdm-etc-service config)
|
(define (gdm-configuration-file config)
|
||||||
(define gdm-configuration-file
|
(mixed-text-file "gdm-custom.conf"
|
||||||
(mixed-text-file "gdm-custom.conf"
|
"[daemon]\n"
|
||||||
"[daemon]\n"
|
"#User=gdm\n"
|
||||||
"#User=gdm\n"
|
"#Group=gdm\n"
|
||||||
"#Group=gdm\n"
|
(if (gdm-configuration-auto-login? config)
|
||||||
(if (gdm-configuration-auto-login? config)
|
(string-append
|
||||||
(string-append
|
"AutomaticLoginEnable=true\n"
|
||||||
"AutomaticLoginEnable=true\n"
|
"AutomaticLogin="
|
||||||
"AutomaticLogin="
|
(or (gdm-configuration-default-user config)
|
||||||
(or (gdm-configuration-default-user config)
|
(error "missing default user for auto-login"))
|
||||||
(error "missing default user for auto-login"))
|
"\n")
|
||||||
"\n")
|
(string-append
|
||||||
(string-append
|
"AutomaticLoginEnable=false\n"
|
||||||
"AutomaticLoginEnable=false\n"
|
"#AutomaticLogin=\n"))
|
||||||
"#AutomaticLogin=\n"))
|
"#TimedLoginEnable=false\n"
|
||||||
"#TimedLoginEnable=false\n"
|
"#TimedLogin=\n"
|
||||||
"#TimedLogin=\n"
|
"#TimedLoginDelay=0\n"
|
||||||
"#TimedLoginDelay=0\n"
|
"#InitialSetupEnable=true\n"
|
||||||
"#InitialSetupEnable=true\n"
|
;; Enable me once X is working.
|
||||||
;; Enable me once X is working.
|
"WaylandEnable=false\n"
|
||||||
"WaylandEnable=false\n"
|
"\n"
|
||||||
"\n"
|
"[debug]\n"
|
||||||
"[debug]\n"
|
"#Enable=true\n"
|
||||||
"#Enable=true\n"
|
"\n"
|
||||||
"\n"
|
"[security]\n"
|
||||||
"[security]\n"
|
"#DisallowTCP=true\n"
|
||||||
"#DisallowTCP=true\n"
|
"#AllowRemoteAutoLogin=false\n"))
|
||||||
"#AllowRemoteAutoLogin=false\n"))
|
|
||||||
`(("gdm" ,(file-union
|
|
||||||
"gdm"
|
|
||||||
`(("custom.conf" ,gdm-configuration-file))))))
|
|
||||||
|
|
||||||
(define (gdm-pam-service config)
|
(define (gdm-pam-service config)
|
||||||
"Return a PAM service for @command{gdm}."
|
"Return a PAM service for @command{gdm}."
|
||||||
|
@ -698,6 +694,9 @@ makes the good ol' XlockMore usable."
|
||||||
"/bin/gdm"))
|
"/bin/gdm"))
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
(list (string-append
|
(list (string-append
|
||||||
|
"GDM_CUSTOM_CONF="
|
||||||
|
#$(gdm-configuration-file config))
|
||||||
|
(string-append
|
||||||
"GDM_X_SERVER="
|
"GDM_X_SERVER="
|
||||||
#$(gdm-configuration-x-server config))
|
#$(gdm-configuration-x-server config))
|
||||||
;; XXX: GDM requires access to a handful of
|
;; XXX: GDM requires access to a handful of
|
||||||
|
@ -719,8 +718,6 @@ makes the good ol' XlockMore usable."
|
||||||
(const %gdm-accounts))
|
(const %gdm-accounts))
|
||||||
(service-extension pam-root-service-type
|
(service-extension pam-root-service-type
|
||||||
gdm-pam-service)
|
gdm-pam-service)
|
||||||
(service-extension etc-service-type
|
|
||||||
gdm-etc-service)
|
|
||||||
(service-extension dbus-root-service-type
|
(service-extension dbus-root-service-type
|
||||||
(compose list
|
(compose list
|
||||||
gdm-configuration-gdm))))
|
gdm-configuration-gdm))))
|
||||||
|
|
Reference in a new issue