2018-02-09 22:10:56 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let cfg = config.programs.criu;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.criu = {
|
2024-04-17 11:37:58 +00:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2018-02-09 22:10:56 +00:00
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Install {command}`criu` along with necessary kernel options.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-04-17 11:37:58 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2018-02-09 22:10:56 +00:00
|
|
|
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
|
|
|
(isYes "CHECKPOINT_RESTORE")
|
|
|
|
];
|
|
|
|
boot.kernel.features.criu = true;
|
|
|
|
environment.systemPackages = [ pkgs.criu ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|