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