1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let cfg = config.programs.criu;
6in {
7
8 options = {
9 programs.criu = {
10 enable = mkOption {
11 default = false;
12 description = ''
13 Install <command>criu</command> along with necessary kernel options.
14 '';
15 };
16 };
17 };
18 config = mkIf cfg.enable {
19 system.requiredKernelConfig = with config.lib.kernelConfig; [
20 (isYes "CHECKPOINT_RESTORE")
21 ];
22 boot.kernel.features.criu = true;
23 environment.systemPackages = [ pkgs.criu ];
24 };
25
26}