about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorTimo Meijer <timo.meijer@live.nl>2015-11-28 12:06:40 +0000
committerTimo Meijer <timo.meijer@live.nl>2015-11-30 12:58:13 +0000
commita621fd76c2fa6d8ffaab70ee7d10aaee02597cfc (patch)
treeecedfb4c8401b6c66b25621170986760ae31bf50 /nixos
parent59c6fba342fabbd456675a0438c69da5b2efc488 (diff)
lightdm-gtk-greeter module: Add configuration options for theme and iconTheme
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix50
1 files changed, 46 insertions, 4 deletions
diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
index 10a7c535c25b9..bea443aa9c42c 100644
--- a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
@@ -10,8 +10,8 @@ let
 
   inherit (pkgs) stdenv lightdm writeScript writeText;
 
-  theme = pkgs.gnome3.gnome_themes_standard;
-  icons = pkgs.gnome3.defaultIconTheme;
+  theme = cfg.theme.package;
+  icons = cfg.iconTheme.package;
 
   # 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
@@ -45,14 +45,15 @@ let
   gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
     ''
     [greeter]
-    theme-name = Adwaita
-    icon-theme-name = Adwaita
+    theme-name = ${cfg.theme.name}
+    icon-theme-name = ${cfg.iconTheme.name}
     background = ${ldmcfg.background}
     '';
 
 in
 {
   options = {
+
     services.xserver.displayManager.lightdm.greeters.gtk = {
 
       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 {