| 
									
										
										
										
											2010-04-15 12:11:33 +00:00
										 |  |  | { config, pkgs, ... }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  |   inherit (pkgs.lib) mkOption mkIf; | 
					
						
							|  |  |  |   cfg = config.environment.blcr; | 
					
						
							| 
									
										
										
										
											2013-02-08 08:57:42 +01:00
										 |  |  |   blcrPkg = config.boot.kernelPackages.blcr; | 
					
						
							| 
									
										
										
										
											2010-04-15 12:11:33 +00:00
										 |  |  | in | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   ###### interface | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   options = { | 
					
						
							|  |  |  |     environment.blcr.enable = mkOption { | 
					
						
							|  |  |  |       default = false; | 
					
						
							|  |  |  |       description = | 
					
						
							| 
									
										
										
										
											2010-06-02 16:05:09 +00:00
										 |  |  |         "Wheter to enable support for the BLCR checkpointing tool."; | 
					
						
							| 
									
										
										
										
											2010-04-15 12:11:33 +00:00
										 |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   ###### implementation | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   config = mkIf cfg.enable { | 
					
						
							| 
									
										
										
										
											2013-02-08 08:57:42 +01:00
										 |  |  |     boot.kernelModules = [ "blcr" "blcr_imports" ]; | 
					
						
							|  |  |  |     boot.extraModulePackages = [ blcrPkg ]; | 
					
						
							| 
									
										
										
										
											2010-04-15 12:11:33 +00:00
										 |  |  |     environment.systemPackages = [ blcrPkg ]; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |