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