| 
									
										
										
										
											2014-08-14 02:17:55 +02:00
										 |  |  | { config, lib, pkgs, ... }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | with lib; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  |   cfg = config.services.thermald; | 
					
						
							|  |  |  | in { | 
					
						
							|  |  |  |   ###### interface | 
					
						
							|  |  |  |   options = {  | 
					
						
							|  |  |  |     services.thermald = {  | 
					
						
							|  |  |  |       enable = mkOption { | 
					
						
							|  |  |  |         default = false; | 
					
						
							|  |  |  |         description = ''
 | 
					
						
							|  |  |  |           Whether to enable thermald, the temperature management daemon. | 
					
						
							|  |  |  |         ''; 
 | 
					
						
							|  |  |  |       };   | 
					
						
							|  |  |  |     };   | 
					
						
							|  |  |  |   };   | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   ###### implementation | 
					
						
							|  |  |  |   config = mkIf cfg.enable { | 
					
						
							| 
									
										
										
										
											2014-11-06 15:18:56 +02:00
										 |  |  |     services.dbus.packages = [ pkgs.thermald ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-08-14 02:17:55 +02:00
										 |  |  |     systemd.services.thermald = { | 
					
						
							|  |  |  |       description = "Thermal Daemon Service"; | 
					
						
							|  |  |  |       wantedBy = [ "multi-user.target" ]; | 
					
						
							|  |  |  |       script = "exec ${pkgs.thermald}/sbin/thermald --no-daemon --dbus-enable"; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |