1 { config, lib, pkgs, ... }:
6 ldmcfg = config.services.xserver.displayManager.lightdm;
7 cfg = ldmcfg.greeters.slick;
9 inherit (pkgs) writeText;
11 theme = cfg.theme.package;
12 icons = cfg.iconTheme.package;
13 font = cfg.font.package;
14 cursors = cfg.cursorTheme.package;
16 slickGreeterConf = writeText "slick-greeter.conf" ''
18 background=${ldmcfg.background}
19 theme-name=${cfg.theme.name}
20 icon-theme-name=${cfg.iconTheme.name}
21 font-name=${cfg.font.name}
22 cursor-theme-name=${cfg.cursorTheme.name}
23 cursor-theme-size=${toString cfg.cursorTheme.size}
24 draw-user-backgrounds=${boolToString cfg.draw-user-backgrounds}
30 services.xserver.displayManager.lightdm.greeters.slick = {
31 enable = mkEnableOption "lightdm-slick-greeter as the lightdm greeter";
36 default = pkgs.gnome-themes-extra;
37 defaultText = literalExpression "pkgs.gnome-themes-extra";
39 The package path that contains the theme given in the name option.
47 Name of the theme to use for the lightdm-slick-greeter.
55 default = pkgs.adwaita-icon-theme;
56 defaultText = literalExpression "pkgs.adwaita-icon-theme";
58 The package path that contains the icon theme given in the name option.
66 Name of the icon theme to use for the lightdm-slick-greeter.
74 default = pkgs.ubuntu-classic;
75 defaultText = literalExpression "pkgs.ubuntu-classic";
77 The package path that contains the font given in the name option.
83 default = "Ubuntu 11";
85 Name of the font to use.
93 default = pkgs.adwaita-icon-theme;
94 defaultText = literalExpression "pkgs.adwaita-icon-theme";
96 The package path that contains the cursor theme given in the name option.
104 Name of the cursor theme to use for the lightdm-slick-greeter.
112 Size of the cursor theme to use for the lightdm-slick-greeter.
117 draw-user-backgrounds = mkEnableOption "draw user backgrounds";
119 extraConfig = mkOption {
123 Extra configuration that should be put in the lightdm-slick-greeter.conf
130 config = mkIf (ldmcfg.enable && cfg.enable) {
131 services.xserver.displayManager.lightdm = {
132 greeters.gtk.enable = false;
133 greeter = mkDefault {
134 package = pkgs.lightdm-slick-greeter.xgreeters;
135 name = "lightdm-slick-greeter";
139 environment.systemPackages = [
145 fonts.packages = [ font ];
147 environment.etc."lightdm/slick-greeter.conf".source = slickGreeterConf;