lol

nixos: loader: added generic config.boot.loader.timeout option

timeout options of grub and gummiboot will inherit the value of this
option by default.

authored by bobvanderlinden.tngl.sh and committed by

Luca Bruno f93ba514 db75b5d0

+20 -2
+1
nixos/modules/module-list.nix
··· 371 371 ./system/boot/kernel.nix 372 372 ./system/boot/kexec.nix 373 373 ./system/boot/loader/efi.nix 374 + ./system/boot/loader/loader.nix 374 375 ./system/boot/loader/generations-dir/generations-dir.nix 375 376 ./system/boot/loader/grub/grub.nix 376 377 ./system/boot/loader/grub/ipxe.nix
+1 -1
nixos/modules/system/boot/loader/grub/grub.nix
··· 196 196 }; 197 197 198 198 timeout = mkOption { 199 - default = 5; 199 + default = if (config.boot.loader.timeout != null) then config.boot.loader.timeout else -1; 200 200 type = types.int; 201 201 description = '' 202 202 Timeout (in seconds) until GRUB boots the default menu item.
+3 -1
nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
··· 31 31 }; 32 32 33 33 timeout = mkOption { 34 - default = null; 34 + default = if (config.boot.loader.timeout != null) then 35 + (if (config.boot.loader.timeout == 0) then null else config.boot.loader.timeout) 36 + else config.boot.loader.timeout; 35 37 36 38 example = 4; 37 39
+15
nixos/modules/system/boot/loader/loader.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + { 6 + options = { 7 + boot.loader.timeout = mkOption { 8 + default = 5; 9 + type = types.nullOr types.int; 10 + description = '' 11 + Timeout (in seconds) until loader boots the default menu item. Use null if the loader menu should be displayed indefinitely. 12 + ''; 13 + }; 14 + }; 15 + }