mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Boot] Add option to set loops per jiffies, reducing boot time
This commit is contained in:
parent
2f4e012e0c
commit
a6660555cf
1 changed files with 11 additions and 0 deletions
11
boot.nix
11
boot.nix
|
|
@ -73,6 +73,13 @@ in
|
|||
type = types.int;
|
||||
};
|
||||
|
||||
loops_per_jiffies = mkOption {
|
||||
description = "Set loops_per_jiffies to given constant, reducing boot-time. A value of 0 means autodetection.";
|
||||
default = 0;
|
||||
example = 4589490;
|
||||
type = types.addCheck types.int (v: v > 500);
|
||||
};
|
||||
|
||||
cmdline = mkOption {
|
||||
description = "Kernel params as attributes (instead of list)";
|
||||
default = { };
|
||||
|
|
@ -88,6 +95,10 @@ in
|
|||
|
||||
aviallon.boot.cmdline = {
|
||||
"syscall.x32" = cfg.x32abi.enable;
|
||||
# Sets loops_per_jiffy to given constant, thus avoiding time-consuming boot-time autodetection
|
||||
# https://www.kernel.org/doc/html/v5.15/admin-guide/kernel-parameters.html
|
||||
"lpj" = cfg.loops_per_jiffies;
|
||||
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue