| 
									
										
										
										
											2014-04-14 16:26:48 +02:00
										 |  |  | { config, lib, pkgs, ... }: | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-14 16:26:48 +02:00
										 |  |  | with lib; | 
					
						
							| 
									
										
										
										
											2009-03-06 12:26:57 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |   configFile = ./xfs.conf; | 
					
						
							| 
									
										
										
										
											2011-09-14 18:20:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  | in | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2009-03-06 12:26:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |   ###### interface | 
					
						
							| 
									
										
										
										
											2009-03-06 12:26:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |   options = { | 
					
						
							| 
									
										
										
										
											2011-09-14 18:20:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |     services.xfs = { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       enable = mkOption { | 
					
						
							| 
									
										
										
										
											2013-10-30 17:37:45 +01:00
										 |  |  |         type = types.bool; | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |         default = false; | 
					
						
							|  |  |  |         description = "Whether to enable the X Font Server."; | 
					
						
							| 
									
										
										
										
											2009-03-06 12:26:57 +00:00
										 |  |  |       }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |     }; | 
					
						
							| 
									
										
										
										
											2009-03-06 12:26:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |   }; | 
					
						
							| 
									
										
										
										
											2009-03-06 12:26:57 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-12 16:36:19 +00:00
										 |  |  |   ###### implementation | 
					
						
							| 
									
										
										
										
											2009-04-30 02:29:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-30 17:37:45 +01:00
										 |  |  |   config = mkIf config.services.xfs.enable { | 
					
						
							|  |  |  |     assertions = singleton | 
					
						
							|  |  |  |       { assertion = config.fonts.enableFontDir; | 
					
						
							|  |  |  |         message = "Please enable fonts.enableFontDir to use the X Font Server."; | 
					
						
							|  |  |  |       }; | 
					
						
							| 
									
										
										
										
											2009-03-06 12:26:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-06 06:50:18 +00:00
										 |  |  |     systemd.services.xfs = { | 
					
						
							|  |  |  |       description = "X Font Server"; | 
					
						
							|  |  |  |       after = [ "network.target" ]; | 
					
						
							|  |  |  |       wantedBy = [ "multi-user.target" ]; | 
					
						
							|  |  |  |       path = [ pkgs.xorg.xfs ]; | 
					
						
							|  |  |  |       script = "xfs -config ${configFile}"; | 
					
						
							|  |  |  |     }; | 
					
						
							| 
									
										
										
										
											2013-10-30 17:37:45 +01:00
										 |  |  |   }; | 
					
						
							| 
									
										
										
										
											2007-11-05 08:54:30 +00:00
										 |  |  | } |