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