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