2010-04-15 12:11:33 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|