diff options
author | Luca Bruno <lethalman88@gmail.com> | 2015-01-30 10:36:26 +0100 |
---|---|---|
committer | Luca Bruno <lethalman88@gmail.com> | 2015-01-30 10:39:50 +0100 |
commit | a239775488722bc8325e9d5bdfefd20bfab38164 (patch) | |
tree | dca13b21ae6fcf0c2069f3f0055e39633db56202 /nixos/modules | |
parent | 3c7e1ef6980e38bb2efe0c2593d99fb3ee8a7804 (diff) | |
parent | a3d5f4f3efe51a13cece90d51284f85033fcbc28 (diff) | |
download | nixlib-a239775488722bc8325e9d5bdfefd20bfab38164.tar nixlib-a239775488722bc8325e9d5bdfefd20bfab38164.tar.gz nixlib-a239775488722bc8325e9d5bdfefd20bfab38164.tar.bz2 nixlib-a239775488722bc8325e9d5bdfefd20bfab38164.tar.lz nixlib-a239775488722bc8325e9d5bdfefd20bfab38164.tar.xz nixlib-a239775488722bc8325e9d5bdfefd20bfab38164.tar.zst nixlib-a239775488722bc8325e9d5bdfefd20bfab38164.zip |
Merge PR #5772, boot.loader.timeout
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/grub/grub.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/gummiboot/gummiboot.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/loader.nix | 15 |
4 files changed, 18 insertions, 2 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index c8d5fcc4e6f6..a0a6f1dd873c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -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 diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 3ea00e40c3b3..b16a725aba8e 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -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. diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix index 003f72b37f9e..6c201eb8212f 100644 --- a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix +++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix @@ -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; diff --git a/nixos/modules/system/boot/loader/loader.nix b/nixos/modules/system/boot/loader/loader.nix new file mode 100644 index 000000000000..28cceafea7ca --- /dev/null +++ b/nixos/modules/system/boot/loader/loader.nix @@ -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. + ''; + }; + }; +} \ No newline at end of file |