summary refs log blame commit diff
path: root/nixos/modules/programs/blcr.nix
blob: 804e1d01f12b86a4ecfdd4cffed1db19bbcc73f7 (plain) (tree)
1
2
3
4
5
6
                     

   
                              
                                
                                            








                                        
                                                                     
      

    


                            

                                                   
                                             

    
{ config, lib, ... }:

let
  inherit (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 ];
  };
}