git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/lightdm: allow cursor theme customisation.
commit4ad82dd6cdd01d195a929a786d006e63ada7a90f authorPiotr Bogdan <ppbogdan@gmail.com> dateFri 31 Mar 2017, 15:31 (10 years ago) parent9c2c5ee
1 file changed+32−1
nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix+32−1
nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix+32−1
@@ -12,6 +12,7 @@ let
1212
1313 theme = cfg.theme.package;
1414 icons = cfg.iconTheme.package;
15+ cursors = cfg.cursorTheme.package;
1516
1617 # The default greeter provided with this expression is the GTK greeter.
1718 # Again, we need a few things in the environment for the greeter to run with
@@ -28,7 +29,8 @@ let
2829 --set GTK_EXE_PREFIX "${theme}" \
2930 --set GTK_DATA_PREFIX "${theme}" \
3031 --set XDG_DATA_DIRS "${theme}/share:${icons}/share" \
31− --set XDG_CONFIG_HOME "${theme}/share"
32+ --set XDG_CONFIG_HOME "${theme}/share" \
33+ --set XCURSOR_PATH "${cursors}/share/icons"
3234
3335 cat - > $out/lightdm-gtk-greeter.desktop << EOF
3436 [Desktop Entry]
@@ -44,6 +46,8 @@ let
4446 [greeter]
4547 theme-name = ${cfg.theme.name}
4648 icon-theme-name = ${cfg.iconTheme.name}
49+ cursor-theme-name = ${cfg.cursorTheme.name}
50+ cursor-theme-size = ${toString cfg.cursorTheme.size}
4751 background = ${ldmcfg.background}
4852 ${optionalString (cfg.clock-format != null) "clock-format = ${cfg.clock-format}"}
4953 ${optionalString (cfg.indicators != null) "indicators = ${concatStringsSep ";" cfg.indicators}"}
@@ -106,6 +110,33 @@ in
106110
107111 };
108112
113+ cursorTheme = {
114+
115+ package = mkOption {
116+ default = pkgs.gnome3.defaultIconTheme;
117+ defaultText = "pkgs.gnome3.defaultIconTheme";
118+ description = ''
119+ The package path that contains the cursor theme given in the name option.
120+ '';
121+ };
122+
123+ name = mkOption {
124+ type = types.str;
125+ default = "Adwaita";
126+ description = ''
127+ Name of the cursor theme to use for the lightdm-gtk-greeter.
128+ '';
129+ };
130+
131+ size = mkOption {
132+ type = types.int;
133+ default = 16;
134+ description = ''
135+ Size of the cursor theme to use for the lightdm-gtk-greeter.
136+ '';
137+ };
138+ };
139+
109140 clock-format = mkOption {
110141 type = types.nullOr types.str;
111142 default = null;