[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/10: services: gdm: Remove etc service.
From: |
guix-commits |
Subject: |
02/10: services: gdm: Remove etc service. |
Date: |
Sat, 16 Feb 2019 18:05:23 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit e57c2adb2a7ed94610f4c35e8710bc1346199de6
Author: Timothy Sample <address@hidden>
Date: Wed Feb 13 14:22:14 2019 -0500
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 <address@hidden>
---
gnu/packages/gnome.scm | 9 +++++--
gnu/services/xorg.scm | 67 ++++++++++++++++++++++++--------------------------
2 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 2f99755..21c6147 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -32,7 +32,7 @@
;;; Copyright © 2018 Jovany Leandro G.C <address@hidden>
;;; Copyright © 2018 Vasile Dumitrascu <address@hidden>
;;; Copyright © 2018 Björn Höfling <address@hidden>
-;;; Copyright © 2018 Timothy Sample <address@hidden>
+;;; Copyright © 2018, 2019 Timothy Sample <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -5462,6 +5462,9 @@ libxml2.")
;; processes.
"gdm_session_set_environment_variable (self,
\"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
;; variable, but it doesn't do that right now. Anyway
;;
/run/current-system/profile/share/gnome-session/sessions/gnome.desktop
@@ -5481,7 +5484,9 @@ libxml2.")
;; Look for custom GDM conf in /run/current-system.
(substitute* '("common/gdm-settings-desktop-backend.c")
(("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.
(substitute* '("daemon/gdm-server.c")
(("\\(X_SERVER X_SERVER_ARG_FORMAT")
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 1efb275..de5438e 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2017 Andy Wingo <address@hidden>
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès
<address@hidden>
;;; Copyright © 2015 Sou Bunnbu <address@hidden>
-;;; Copyright © 2018 Timothy Sample <address@hidden>
+;;; Copyright © 2018, 2019 Timothy Sample <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -633,38 +633,34 @@ makes the good ol' XlockMore usable."
(x-server gdm-configuration-x-server
(default (xorg-wrapper))))
-(define (gdm-etc-service config)
- (define gdm-configuration-file
- (mixed-text-file "gdm-custom.conf"
- "[daemon]\n"
- "#User=gdm\n"
- "#Group=gdm\n"
- (if (gdm-configuration-auto-login? config)
- (string-append
- "AutomaticLoginEnable=true\n"
- "AutomaticLogin="
- (or (gdm-configuration-default-user config)
- (error "missing default user for auto-login"))
- "\n")
- (string-append
- "AutomaticLoginEnable=false\n"
- "#AutomaticLogin=\n"))
- "#TimedLoginEnable=false\n"
- "#TimedLogin=\n"
- "#TimedLoginDelay=0\n"
- "#InitialSetupEnable=true\n"
- ;; Enable me once X is working.
- "WaylandEnable=false\n"
- "\n"
- "[debug]\n"
- "#Enable=true\n"
- "\n"
- "[security]\n"
- "#DisallowTCP=true\n"
- "#AllowRemoteAutoLogin=false\n"))
- `(("gdm" ,(file-union
- "gdm"
- `(("custom.conf" ,gdm-configuration-file))))))
+(define (gdm-configuration-file config)
+ (mixed-text-file "gdm-custom.conf"
+ "[daemon]\n"
+ "#User=gdm\n"
+ "#Group=gdm\n"
+ (if (gdm-configuration-auto-login? config)
+ (string-append
+ "AutomaticLoginEnable=true\n"
+ "AutomaticLogin="
+ (or (gdm-configuration-default-user config)
+ (error "missing default user for auto-login"))
+ "\n")
+ (string-append
+ "AutomaticLoginEnable=false\n"
+ "#AutomaticLogin=\n"))
+ "#TimedLoginEnable=false\n"
+ "#TimedLogin=\n"
+ "#TimedLoginDelay=0\n"
+ "#InitialSetupEnable=true\n"
+ ;; Enable me once X is working.
+ "WaylandEnable=false\n"
+ "\n"
+ "[debug]\n"
+ "#Enable=true\n"
+ "\n"
+ "[security]\n"
+ "#DisallowTCP=true\n"
+ "#AllowRemoteAutoLogin=false\n"))
(define (gdm-pam-service config)
"Return a PAM service for @command{gdm}."
@@ -698,6 +694,9 @@ makes the good ol' XlockMore usable."
"/bin/gdm"))
#:environment-variables
(list (string-append
+ "GDM_CUSTOM_CONF="
+ #$(gdm-configuration-file config))
+ (string-append
"GDM_X_SERVER="
#$(gdm-configuration-x-server config))
;; XXX: GDM requires access to a handful of
@@ -719,8 +718,6 @@ makes the good ol' XlockMore usable."
(const %gdm-accounts))
(service-extension pam-root-service-type
gdm-pam-service)
- (service-extension etc-service-type
- gdm-etc-service)
(service-extension dbus-root-service-type
(compose list
gdm-configuration-gdm))))
- branch master updated (8d2c3c5 -> 54eadc4), guix-commits, 2019/02/16
- 01/10: doc: '--inherit' option can be repeated., guix-commits, 2019/02/16
- 03/10: gnu: gnome-session: Use absolute paths in .desktop files., guix-commits, 2019/02/16
- 02/10: services: gdm: Remove etc service.,
guix-commits <=
- 04/10: gnu: gdm: Add links to required login-session files., guix-commits, 2019/02/16
- 07/10: gnu: gdm: Run dbus-daemon via a wrapper script., guix-commits, 2019/02/16
- 08/10: services: gdm: Make dependencies explicit., guix-commits, 2019/02/16
- 09/10: services: gdm: Allow for custom X session scripts., guix-commits, 2019/02/16
- 06/10: gnu: gdm: Simplify pre-configure phase., guix-commits, 2019/02/16
- 05/10: gnu: gdm: Use absolute path for gnome-session., guix-commits, 2019/02/16
- 10/10: self: Generated (guix config) honors %CURRENT-SYSTEM., guix-commits, 2019/02/16