lightdm-gtk-greeter module: Add configuration options for theme and iconTheme

This commit is contained in:
Timo Meijer 2015-11-28 12:06:40 +00:00
parent 59c6fba342
commit a621fd76c2

View File

@ -10,8 +10,8 @@ let
inherit (pkgs) stdenv lightdm writeScript writeText; inherit (pkgs) stdenv lightdm writeScript writeText;
theme = pkgs.gnome3.gnome_themes_standard; theme = cfg.theme.package;
icons = pkgs.gnome3.defaultIconTheme; icons = cfg.iconTheme.package;
# The default greeter provided with this expression is the GTK greeter. # The default greeter provided with this expression is the GTK greeter.
# Again, we need a few things in the environment for the greeter to run with # Again, we need a few things in the environment for the greeter to run with
@ -45,14 +45,15 @@ let
gtkGreeterConf = writeText "lightdm-gtk-greeter.conf" gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
'' ''
[greeter] [greeter]
theme-name = Adwaita theme-name = ${cfg.theme.name}
icon-theme-name = Adwaita icon-theme-name = ${cfg.iconTheme.name}
background = ${ldmcfg.background} background = ${ldmcfg.background}
''; '';
in in
{ {
options = { options = {
services.xserver.displayManager.lightdm.greeters.gtk = { services.xserver.displayManager.lightdm.greeters.gtk = {
enable = mkOption { enable = mkOption {
@ -63,7 +64,48 @@ in
''; '';
}; };
theme = {
package = mkOption {
type = types.path;
default = pkgs.gnome3.gnome_themes_standard;
description = ''
The package path that contains the theme given in the name option.
'';
};
name = mkOption {
type = types.str;
default = "Adwaita";
description = ''
Name of the theme to use for the lightdm-gtk-greeter.
'';
};
};
iconTheme = {
package = mkOption {
type = types.path;
default = pkgs.gnome3.defaultIconTheme;
description = ''
The package path that contains the icon theme given in the name option.
'';
};
name = mkOption {
type = types.str;
default = "Adwaita";
description = ''
Name of the icon theme to use for the lightdm-gtk-greeter.
'';
};
};
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {