2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let cfg = config.programs.criu;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.criu = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2020-04-24 23:36:52 +00:00
|
|
|
default = false;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
Install {command}`criu` along with necessary kernel options.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2020-04-24 23:36:52 +00:00
|
|
|
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
|
|
|
(isYes "CHECKPOINT_RESTORE")
|
|
|
|
];
|
|
|
|
boot.kernel.features.criu = true;
|
|
|
|
environment.systemPackages = [ pkgs.criu ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|