treewide: use mkTarget (batch 2) (#1362)

Link: https://github.com/nix-community/stylix/pull/1362

Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
awwpotato 2025-05-23 10:23:39 -07:00 committed by GitHub
parent 8dd18dd395
commit 7ffb31da69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1355 additions and 1238 deletions

View file

@ -1,14 +1,21 @@
{ config, lib, ... }:
let
cfg = config.stylix.targets.lightdm;
in
{
options.stylix.targets.lightdm = {
enable = config.lib.stylix.mkEnableTarget "LightDM" true;
mkTarget,
config,
lib,
...
}:
mkTarget {
name = "lightdm";
humanName = "LightDM";
extraOptions = {
useWallpaper = config.lib.stylix.mkEnableWallpaper "LightDM" true;
};
config.services.xserver.displayManager.lightdm.background = lib.mkIf (
config.stylix.enable && cfg.enable && cfg.useWallpaper
) config.stylix.image;
configElements =
{ cfg, image }:
{
services.xserver.displayManager.lightdm.background =
lib.mkIf cfg.useWallpaper image;
};
}