diff options
Diffstat (limited to 'nixos/modules/programs/blcr.nix')
-rw-r--r-- | nixos/modules/programs/blcr.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nixos/modules/programs/blcr.nix b/nixos/modules/programs/blcr.nix new file mode 100644 index 000000000000..e1e31b4a56aa --- /dev/null +++ b/nixos/modules/programs/blcr.nix @@ -0,0 +1,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 ]; + }; +} |