summary refs log tree commit diff
path: root/nixos/modules/programs/blcr.nix
blob: e1e31b4a56aa508a6a840b19edcdafa7a45ea740 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ 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 ];
  };
}