mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
28 lines
552 B
Nix
28 lines
552 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
cfg = config.environment.blcr;
|
|
blcrPkg = config.boot.kernelPackages.blcr;
|
|
in
|
|
|
|
{
|
|
###### interface
|
|
|
|
options = {
|
|
environment.blcr.enable = mkOption {
|
|
default = false;
|
|
description =
|
|
"Whether to enable support for the BLCR checkpointing tool.";
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
boot.kernelModules = [ "blcr" "blcr_imports" ];
|
|
boot.extraModulePackages = [ blcrPkg ];
|
|
environment.systemPackages = [ blcrPkg ];
|
|
};
|
|
}
|