From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id IDiQNX0CJmch9QAAqHPOHw:P1 (envelope-from ) for ; Sat, 02 Nov 2024 10:44:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id IDiQNX0CJmch9QAAqHPOHw (envelope-from ) for ; Sat, 02 Nov 2024 11:44:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=V4QoEzmK; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=nNZdp50y; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730544253; a=rsa-sha256; cv=none; b=ScvegrHePdFU6dmMMMuk57IINoieMNI1Lsp1nbuc7zzOunX/2afuNaxH8iV5+Bv8WKuaAN OhjqyzO1OVkM1VgwuA+CZOTa9o1cba3BGQErflXWUutKPb0tKoLpmnxRRAhblqMUyDraA+ xSOC0za7fDfbgHKHi3Lc4hTe2FqGm9zmhGgU5HztOHLK2Mt6aQrXU/k5DVQCnLAYJqi05N 2dqmTbPDgKFAdKOHdGQGFF4RrBuIuqN3phHe98PynygvgFW29AF1/xQDb+X3/7JCKpPTvo J2rHf992hEmi9bmd0IiEj3krWAbHNYnBck97+opLPAXQDcZx6RtOkOynk9J/pw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=V4QoEzmK; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=nNZdp50y; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730544253; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=RpWeXaz2bXJ6X7oB+WeE0X/HazV5EbsgSSQy2k+Zea8=; b=nA00WGGKajQMeIPHuFhgB8JmWreZ/mwinfsCrjl+0QODmm+ikegrc3rJ9+m58aPeVJrXVU XO0H9h8+soSBdchJRWCspqswadBHVJjnt+7oWdRNZdfBQlopbUebVPIalUSKnZbbmeQYFJ 2gZbp62refYaIEPnG2/5m+cRhIfZ7q3owQhVzqNTVl4IfXRNtLTQaMyrLHY8jm6VaY1BAw U59zYL7h8GVM3ohLzdnYtxHYif+vJ8/DZZsX90hJpUxM336jI+Z1rlZReSQjtxFQ/4y4Y0 W9IkBerD7ZtNbjWPNZFrYeMchKLX48jCjnUM3PmeSqH5YuA/US/xBDqplu1Fdg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2CA73652DC for ; Sat, 02 Nov 2024 11:44:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7BEr-0005yu-2n; Sat, 02 Nov 2024 06:20:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7BEi-0005ty-1U for bug-guix@gnu.org; Sat, 02 Nov 2024 06:20:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7BEh-0006fF-Nq for bug-guix@gnu.org; Sat, 02 Nov 2024 06:20:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=DacZh0I50QwK9wuUqLKFft9xTOCA+X8Wk5sstCvddKg=; b=V4QoEzmKQzyDZ3+fmJEuZPVobFcZ8BOIzYNbXWUICVIctKfrG7yUhVFOhadi9nV/6kKHXUkztDKvaiO+wNo2Ajmnqgaf4HXRllSpUCLTh86RtbO72Dvq1NeqCTe68Qt2nWn/hkhyh6PAU21CQnrdouioVO8UMr63GktsG8R+ADiUWchZwo7prRit+azrhj8P7DjewIsNziOhuvcjp8fblH0Cgry58MSH4kM0XoXP+UThZnBY4T4D6MBdXhcvC/AmUCzga9FsnG9JLSuWK3l9mo19HP5IisE+eZbXLxwdfIAYV+3lNYFGIDuiBof1mBe8Io5S67LyfamvNYbX+V7Jvg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7BEh-0005aG-H7 for bug-guix@gnu.org; Sat, 02 Nov 2024 06:20:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#73859: [PATCH 2/2] gnu: lightdm-service-type: Add lightdm.conf to /etc/lightdm. Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 02 Nov 2024 10:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73859 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 73859@debbugs.gnu.org Cc: Dariqq , Maxim Cournoyer Received: via spool by 73859-submit@debbugs.gnu.org id=B73859.173054279621430 (code B ref 73859); Sat, 02 Nov 2024 10:20:03 +0000 Received: (at 73859) by debbugs.gnu.org; 2 Nov 2024 10:19:56 +0000 Received: from localhost ([127.0.0.1]:53176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7BEZ-0005Za-Sz for submit@debbugs.gnu.org; Sat, 02 Nov 2024 06:19:56 -0400 Received: from mout01.posteo.de ([185.67.36.65]:44729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7BEX-0005Z4-Ox for 73859@debbugs.gnu.org; Sat, 02 Nov 2024 06:19:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B779B240027 for <73859@debbugs.gnu.org>; Sat, 2 Nov 2024 11:19:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1730542787; bh=q4yLK6Q1LkKvLBqo5j2fOlUXF8q7yRs5DtWaScSJCDU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=nNZdp50y6uJ3oXB6YqxRh4/NkEkKEQLz3+B6pF3yGpiSXJqFGOWlH6Rt2CMtlIyfx igleq7/5RLjChWpk3bZP8V0YFM3Q9XjuLumr4bMXMQFi2JvamLzDl25anIxgV6jo/z VEsdyEF9VozEmRZjN/8ANYfjSMwrTKlfTzNXTWLDjmypa5raBZ6Cx597QcyxNAwhi6 FdPMmrGNEK0jJdZ1+yYjjSLLjQaoHInHYhctZbWEIEY3JIXrdCpSGQgF5CsPRZwTNF eSl0eg3VPrEmwEyDQQ2C3LblpAKZqv7sR7pt/P8nQc3+RN03cItCDsK2+UfvD0m3b3 u7wBj0vcG5MPg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XgYcz023Xz6tx1; Sat, 2 Nov 2024 11:19:46 +0100 (CET) From: Dariqq Date: Sat, 2 Nov 2024 10:18:33 +0000 Message-ID: <073c63896dcec5eae8e81df5fc1b6131f33add78.1730541249.git.dariqq@posteo.net> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 3.15 X-Spam-Score: 3.15 X-Migadu-Queue-Id: 2CA73652DC X-Migadu-Scanner: mx12.migadu.com X-TUID: 4DpMjXYpmF2F * gnu/services/lightdm.scm (lightdm-configuration->greeters-config-dir): Rename to lightdm-configuration-directory and add the lightdm-configuration-file. (lightdm-shepherd-service): Don't pass the configuration file, don't set XDG_CONFIG_DIRS (lightdm-etc-service): New procedure. (lightdm-service-type): Use lightdm-etc-service as the etc-extension. Change-Id: I982ec1f7bdfd085621f45a8a1e4b175ab481202f --- gnu/services/lightdm.scm | 48 ++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/gnu/services/lightdm.scm b/gnu/services/lightdm.scm index 798c106563..191cb5635b 100644 --- a/gnu/services/lightdm.scm +++ b/gnu/services/lightdm.scm @@ -397,15 +397,6 @@ (define-configuration/no-serialization lightdm-configuration (list-of-strings '()) "Extra configuration values to append to the LightDM configuration file.")) -(define (lightdm-configuration->greeters-config-dir config) - "Return a directory containing all the serialized greeter configurations -from CONFIG, a object." - (file-union "etc-lightdm" - (append-map (lambda (g) - `((,(greeter-configuration->conf-name g) - ,(greeter-configuration->file g)))) - (lightdm-configuration-greeters config)))) - (define (lightdm-configuration->packages config) "Return all the greeter packages and their assets defined in CONFIG, a object, as well as the lightdm package itself." @@ -496,6 +487,16 @@ (define (lightdm-configuration-file config) lightdm-seat-configuration-fields))) seats)))) +(define (lightdm-configuration-directory config) + "Return a directory containing the serialized lightdm configuration +and all the serialized greeter configurations from CONFIG." + (file-union "etc-lightdm" + (cons `("lightdm.conf" ,(lightdm-configuration-file config)) + (map (lambda (g) + `(,(greeter-configuration->conf-name g) + ,(greeter-configuration->file g))) + (lightdm-configuration-greeters config))))) + (define %lightdm-accounts (list (user-group (name "lightdm") (system? #t)) (user-account @@ -589,9 +590,7 @@ (define (lightdm-shepherd-service config) "/sbin/lightdm") #$@(if (lightdm-configuration-debug? config) #~("--debug") - #~()) - "--config" - #$(lightdm-configuration-file config))) + #~()))) (define lightdm-paths (let ((lightdm (lightdm-configuration-lightdm config))) @@ -601,9 +600,6 @@ (define (lightdm-shepherd-service config) '("/bin" "/sbin" "/libexec")) ":"))) - (define greeters-config-dir - (lightdm-configuration->greeters-config-dir config)) - (define data-dirs ;; LightDM itself needs to be in XDG_DATA_DIRS for the accountsservice ;; interface it provides to be picked up. The greeters must also be in @@ -626,11 +622,7 @@ (define (lightdm-shepherd-service config) ;; Lightdm needs itself in its PATH. #:environment-variables (list - ;; It knows to look for greeter - ;; configurations in XDG_CONFIG_DIRS... - (string-append "XDG_CONFIG_DIRS=" - #$greeters-config-dir) - ;; ... and for greeter .desktop files as + ;; It looks for greeter .desktop files as ;; well as lightdm accountsservice ;; interface in XDG_DATA_DIRS. (string-append "XDG_DATA_DIRS=" @@ -638,6 +630,11 @@ (define (lightdm-shepherd-service config) (string-append "PATH=" #$lightdm-paths)))) (stop #~(make-kill-destructor))))) +(define (lightdm-etc-service config) + "Return a list of FILES for @var{etc-service-type} to build the +/etc/lightdm directory using CONFIG" + (list `("lightdm" ,(lightdm-configuration-directory config)))) + (define lightdm-service-type (handle-xorg-configuration lightdm-configuration @@ -666,13 +663,10 @@ (define lightdm-service-type ;; https://github.com/NixOS/nixpkgs/issues/45059. (service-extension profile-service-type lightdm-configuration->packages) - ;; This is needed for the greeter itself to find its configuration, - ;; because XDG_CONF_DIRS gets overridden by /etc/profile. - (service-extension - etc-service-type - (lambda (config) - `(("lightdm" - ,(lightdm-configuration->greeters-config-dir config))))))) + ;; This is needed for lightdm and greeter + ;; to find their configuration + (service-extension etc-service-type + lightdm-etc-service))) (description "Run @code{lightdm}, the LightDM graphical login manager.")))) -- 2.46.0