| 
									
										
										
										
											2016-11-01 17:06:39 -02:00
										 |  |  | { config, lib, pkgs, ... }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | with lib; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   xcfg = config.services.xserver; | 
					
						
							|  |  |  |   cfg = xcfg.desktopManager.lumina; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | in | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   options = { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     services.xserver.desktopManager.lumina.enable = mkOption { | 
					
						
							|  |  |  |       type = types.bool; | 
					
						
							|  |  |  |       default = false; | 
					
						
							|  |  |  |       description = "Enable the Lumina desktop manager"; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   config = mkIf (xcfg.enable && cfg.enable) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     services.xserver.desktopManager.session = singleton { | 
					
						
							|  |  |  |       name = "lumina"; | 
					
						
							|  |  |  |       start = ''
 | 
					
						
							|  |  |  |         exec ${pkgs.lumina}/bin/start-lumina-desktop | 
					
						
							|  |  |  |       '';
 | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     environment.systemPackages = [ | 
					
						
							|  |  |  |       pkgs.fluxbox | 
					
						
							| 
									
										
										
										
											2017-03-19 21:46:35 -03:00
										 |  |  |       pkgs.libsForQt5.kwindowsystem | 
					
						
							| 
									
										
										
										
											2016-11-01 17:06:39 -02:00
										 |  |  |       pkgs.lumina | 
					
						
							|  |  |  |       pkgs.numlockx | 
					
						
							|  |  |  |       pkgs.qt5.qtsvg | 
					
						
							|  |  |  |       pkgs.xscreensaver | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # Link some extra directories in /run/current-system/software/share | 
					
						
							|  |  |  |     environment.pathsToLink = [ | 
					
						
							|  |  |  |       "/share/lumina" | 
					
						
							| 
									
										
										
										
											2018-08-15 09:55:35 +01:00
										 |  |  |       # FIXME: modules should link subdirs of `/share` rather than relying on this | 
					
						
							| 
									
										
										
										
											2016-11-01 17:06:39 -02:00
										 |  |  |       "/share" | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |