Merge PR #5772, boot.loader.timeout

This commit is contained in:
Luca Bruno 2015-01-30 10:36:26 +01:00
commit a239775488
4 changed files with 18 additions and 2 deletions

View file

@ -372,6 +372,7 @@
./system/boot/kernel.nix
./system/boot/kexec.nix
./system/boot/loader/efi.nix
./system/boot/loader/loader.nix
./system/boot/loader/generations-dir/generations-dir.nix
./system/boot/loader/grub/grub.nix
./system/boot/loader/grub/ipxe.nix

View file

@ -196,7 +196,7 @@ in
};
timeout = mkOption {
default = 5;
default = if (config.boot.loader.timeout != null) then config.boot.loader.timeout else -1;
type = types.int;
description = ''
Timeout (in seconds) until GRUB boots the default menu item.

View file

@ -31,7 +31,7 @@ in {
};
timeout = mkOption {
default = null;
default = if config.boot.loader.timeout == null then 10000 else config.boot.loader.timeout;
example = 4;

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
with lib;
{
options = {
boot.loader.timeout = mkOption {
default = 5;
type = types.nullOr types.int;
description = ''
Timeout (in seconds) until loader boots the default menu item. Use null if the loader menu should be displayed indefinitely.
'';
};
};
}