1 { config, lib, pkgs, ... }:
5 dmcfg = config.services.xserver.displayManager;
6 ldmcfg = dmcfg.lightdm;
7 cfg = ldmcfg.greeters.enso;
9 theme = cfg.theme.package;
10 icons = cfg.iconTheme.package;
11 cursors = cfg.cursorTheme.package;
13 ensoGreeterConf = pkgs.writeText "lightdm-enso-os-greeter.conf" ''
15 default-wallpaper=${ldmcfg.background}
16 gtk-theme=${cfg.theme.name}
17 icon-theme=${cfg.iconTheme.name}
18 cursor-theme=${cfg.cursorTheme.name}
19 blur=${toString cfg.blur}
20 brightness=${toString cfg.brightness}
25 services.xserver.displayManager.lightdm.greeters.enso = {
30 Whether to enable enso-os-greeter as the lightdm greeter
37 default = pkgs.gnome-themes-extra;
38 defaultText = literalExpression "pkgs.gnome-themes-extra";
40 The package path that contains the theme given in the name option.
48 Name of the theme to use for the lightdm-enso-os-greeter
56 default = pkgs.papirus-icon-theme;
57 defaultText = literalExpression "pkgs.papirus-icon-theme";
59 The package path that contains the icon theme given in the name option.
67 Name of the icon theme to use for the lightdm-enso-os-greeter
75 default = pkgs.capitaine-cursors;
76 defaultText = literalExpression "pkgs.capitaine-cursors";
78 The package path that contains the cursor theme given in the name option.
84 default = "capitane-cursors";
86 Name of the cursor theme to use for the lightdm-enso-os-greeter
95 Whether or not to enable blur
99 brightness = mkOption {
107 extraConfig = mkOption {
111 Extra configuration that should be put in the greeter.conf
118 config = mkIf (ldmcfg.enable && cfg.enable) {
119 environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
121 environment.systemPackages = [
127 services.xserver.displayManager.lightdm = {
128 greeter = mkDefault {
129 package = pkgs.lightdm-enso-os-greeter.xgreeters;
130 name = "pantheon-greeter";
135 enable = mkDefault false;