mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
programs.criu: add nixos option for installing criu + kernel flags
This commit is contained in:
parent
0b621321cd
commit
66080ae4d8
@ -75,6 +75,7 @@
|
||||
./programs/cdemu.nix
|
||||
./programs/chromium.nix
|
||||
./programs/command-not-found/command-not-found.nix
|
||||
./programs/criu.nix
|
||||
./programs/dconf.nix
|
||||
./programs/environment.nix
|
||||
./programs/fish.nix
|
||||
|
26
nixos/modules/programs/criu.nix
Normal file
26
nixos/modules/programs/criu.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.programs.criu;
|
||||
in {
|
||||
|
||||
options = {
|
||||
programs.criu = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Install <command>criu</command> along with necessary kernel options.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
||||
(isYes "CHECKPOINT_RESTORE")
|
||||
];
|
||||
boot.kernel.features.criu = true;
|
||||
environment.systemPackages = [ pkgs.criu ];
|
||||
};
|
||||
|
||||
}
|
@ -682,5 +682,22 @@ with stdenv.lib;
|
||||
WW_MUTEX_SELFTEST? n
|
||||
''}
|
||||
|
||||
${optionalString (features.criu or false) ''
|
||||
EXPERT y
|
||||
CHECKPOINT_RESTORE y
|
||||
''}
|
||||
|
||||
${optionalString ((features.criu or false) && (features.criu_revert_expert or true))
|
||||
# Revert some changes, introduced by EXPERT, when necessary for criu
|
||||
''
|
||||
RFKILL_INPUT? y
|
||||
HID_PICOLCD_FB? y
|
||||
HID_PICOLCD_BACKLIGHT? y
|
||||
HID_PICOLCD_LCD? y
|
||||
HID_PICOLCD_LEDS? y
|
||||
HID_PICOLCD_CIR? y
|
||||
DEBUG_MEMORY_INIT? y
|
||||
''}
|
||||
|
||||
${extraConfig}
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user