2010-04-15 13:11:33 +01: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 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 ];
|
|
|
|
};
|
|
|
|
}
|