unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: L p R n d n <guix@lprndn.info>
Cc: 35305@debbugs.gnu.org
Subject: [bug#35305] LightDM service
Date: Sun, 12 Apr 2020 09:53:41 +0000	[thread overview]
Message-ID: <2d2d720d1fd6a6357a171e13953a593b@waegenei.re> (raw)
In-Reply-To: <87sghcir5k.fsf@lprndn.info>

Hello L p R n d n,

Using `set-xorg-configuration` with `lightdm-service-type` seems to be
working.

There is an error on vt1 at startup about some dbus stuff related to
“accountservice”. The cursor theme isn't set as well as the icon theme, 
it
seems; it may come from some missing environment variable as NixOS set a
few of them in their service[0].

After digging in the new service file I keep wondering if it's the right
way to go about implementing it. I tried to set a simple setting
for `lightdm-gtk-greeter` and I ended up with the following which 
doesn't
look intuitive:

--8<---------------cut here---------------start------------->8---
(service lightdm-service-type
          (lightdm-configuration
           (greeter-configuration-file
            (lightdm-gtk-greeter-configuration-file
             (lightdm-gtk-greeter-configuration
              (extra-config "hide-user-image=true"))))))
--8<---------------cut here---------------end--------------->8---

Furthermore `lightdm-service-type` only set a single seat while lightdm 
can
have many of them. So maybe there should be a lightdm-seat` record used 
as
a list of seats in `lightdm-service-type`. Each greater will be able to
expand `lightdm-service-type` by appending a seat to it. Then the
configuration could look like this:

--8<---------------cut here---------------start------------->8---
(service lightdm-service-type)
(service lightdm-gtk-greeter-service-type
          (lightdm-gtk-greeter-configuration
           (assets (list guix-artwork))
           (theme-name "Guix")
           (extra-config "hide-user-image=true")))
--8<---------------cut here---------------end--------------->8---

Using this approch would also avoid populating “/etc”, at least for
`lightdm-grk-greeter`, since each greeter would be defined as a service 
and
could expand “/etc” if it really needs it. For `lightdm-gtk-greeter`
specifically avoiding putting config in “/etc/” can be done by compiling 
it
with `-DCONFIG_FILE` pointing to `/run/current-system` And `lightdm` can 
be
started with `--config`.

Here is an example in how to make a conjuration file procedure more
readable while keeping under the line length limit by using 
`match-record`:

--8<---------------cut here---------------start------------->8---
(define (lightdm-gtk-greeter-configuration-file config)
   (match-record config <lightdm-gtk-greeter-configuration>
     (theme-name icon-theme-name cursor-theme-name cursor-size background
                 extra-config)
    (mixed-text-file "lightdm-gtk-greeter.conf" "
[greeter]
theme-name = "           theme-name                   "
icon-theme-name = "      icon-theme-name              "
cursor-theme-name = "    cursor-theme-name            "
cursor-theme-size = "    (number->string cursor-size) "
background = "           background                   "
" extra-config                                        "
")))
--8<---------------cut here---------------end--------------->8---

BTW the default background could use one from Guix artwork repo like
“(file-append %artwork-repository "/grub/GuixSD-fully-black-16-9.svg")”.

WDYT? I may be completely off on the `lightdm-seat` part.

[0]: 
https://github.com/NixOS/nixpkgs/blob/release-19.09/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix#L18

Cheers,
- Brice

  reply	other threads:[~2020-04-12  9:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 14:24 [bug#35305] [WIP] LightDM service L p R n d n
2019-04-18 11:20 ` Jonathan Brielmaier
2019-05-23 11:04 ` [bug#35305] [PATCH] " L p R n d n
     [not found] ` <handler.35305.B.155550391014002.ack@debbugs.gnu.org>
2019-04-18 13:20   ` [bug#35305] Acknowledgement ([WIP] LightDM service) L p R n d n
2019-04-18 16:03     ` L p R n d n
2019-08-26 15:58   ` L p R n d n
2020-03-15 21:50     ` Nicolò Balzarotti
2020-03-16  7:34       ` Efraim Flashner
2020-03-16  8:36         ` L p R n d n
2020-03-19 11:54       ` [bug#35305] LightDM service L p R n d n
2020-04-07 17:06 ` Brice Waegeneire
2020-04-09 16:02   ` L p R n d n
2020-04-12  9:53     ` Brice Waegeneire [this message]
2020-04-14  9:38       ` L p R n d n
2020-04-14 13:17         ` L p R n d n
2020-04-22 15:26       ` L p R n d n
2020-05-06 14:05 ` L p R n d n
2020-05-08 22:18   ` Ricardo Wurmus
2020-05-09 15:09     ` L p R n d n
2020-05-10 19:21       ` Ricardo Wurmus
2020-05-11 10:14         ` L p R n d n
2020-05-12  9:59         ` L p R n d n
2020-05-20 20:51           ` Ricardo Wurmus
2020-05-21  8:28             ` L p R n d n
2020-05-21  9:23               ` Ricardo Wurmus
2020-06-08 15:35                 ` L p R n d n
2022-08-04  5:09                   ` [bug#35305] [WIP] " Maxim Cournoyer
2020-06-19 14:47                 ` [bug#35305] " L p R n d n
2022-08-04  2:19   ` [bug#35305] [WIP] " Maxim Cournoyer
2022-08-31  7:13 ` bug#35305: " Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d2d720d1fd6a6357a171e13953a593b@waegenei.re \
    --to=brice@waegenei.re \
    --cc=35305@debbugs.gnu.org \
    --cc=guix@lprndn.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).