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