Nixpkgs: LightDM background no longer can be set to a simple color, conflicting with the documentation

Created on 16 Jun 2020  Â·  3Comments  Â·  Source: NixOS/nixpkgs

Describe the bug
Commit 3d1706c28df08ca09e9502ef9e17322ea71a70a4 changed the type of the NixOS configuration option services.xserver.displayManager.lightdm.background from str to path, requiring that it be set to the path of an image that is to be used as the desktop background. Formerly it also was allowed to set the background to a solid color, e.g., I have it set to "#000000", and the option documentation still claims that this is allowed: https://github.com/NixOS/nixpkgs/blob/0aa73fdf13bba1d4b380c487dd40817075834ba5/nixos/modules/services/x11/display-managers/lightdm.nix#L138-L140

Given that the option documentation still claims that setting the background to a color is allowed, I suppose commit 3d1706c28df08ca09e9502ef9e17322ea71a70a4 was in error.

Notify maintainers
@jtojnar @worldofpeace

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.43-hardened, NixOS, 20.09pre228622.029a5de0839 (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.6
  • channels(root): "nixos-20.09pre229574.0a146054bdf"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: []
# a list of nixos modules affected by the problem
module: [services.xserver.displayManager.lightdm]
bug

All 3 comments

Thanks for reporting.

Looks like the option actually affects several packages, each having a slightly different semantics:

Not sure if we should update the description to respect the lowest common denominator or support both path and colour (either without any check as before or add an assertion).

Thanks for the information. With this information I was able to get my system building again easily enough by instead using services.xserver.displayManager.lightdm.greeters.gtk.extraConfig. As an easy fix, maybe using ….greeters.*.extraConfig should be suggested, but then, as https://github.com/NixOS/rfcs/pull/42 may be moving slowly towards acceptance, maybe not.

Not sure if we should update the description to respect the lowest common denominator or support both path and colour (either without any check as before or add an assertion).

Considering other NixOS options, it would seem typical to me to have two options, say backgroundFile and backgroundColour, with assertions as necessary. On another hand, maybe such options should be under ….greeters.*, as the format in which a color must be specified could depend on the greeter.

(Edit, 2020-08-02: A more drastic solution in which some users might be interested is to switch to GDM, primarily for other benefits.)

I would prefer having two separate configurations for setting the background image and the background color...

Was this page helpful?
0 / 5 - 0 ratings