summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2015-01-14 20:35:54 +0100
committerLuca Bruno <lethalman88@gmail.com>2015-01-30 09:53:44 +0100
commitf93ba5146954a98a3ba132ebd1cd81f04ba01fe4 (patch)
tree68d5737dae79a0d861e1254a215f5aba9cab28c0 /nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
parentdb75b5d052f67ffdda7232ab032161343e8cca59 (diff)
downloadnixlib-f93ba5146954a98a3ba132ebd1cd81f04ba01fe4.tar
nixlib-f93ba5146954a98a3ba132ebd1cd81f04ba01fe4.tar.gz
nixlib-f93ba5146954a98a3ba132ebd1cd81f04ba01fe4.tar.bz2
nixlib-f93ba5146954a98a3ba132ebd1cd81f04ba01fe4.tar.lz
nixlib-f93ba5146954a98a3ba132ebd1cd81f04ba01fe4.tar.xz
nixlib-f93ba5146954a98a3ba132ebd1cd81f04ba01fe4.tar.zst
nixlib-f93ba5146954a98a3ba132ebd1cd81f04ba01fe4.zip
nixos: loader: added generic config.boot.loader.timeout option
timeout options of grub and gummiboot will inherit the value of this
option by default.
Diffstat (limited to 'nixos/modules/system/boot/loader/gummiboot/gummiboot.nix')
-rw-r--r--nixos/modules/system/boot/loader/gummiboot/gummiboot.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
index 003f72b37f9e..b1ecbb8141fc 100644
--- a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
+++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
@@ -31,7 +31,9 @@ in {
     };
 
     timeout = mkOption {
-      default = null;
+      default = if (config.boot.loader.timeout != null) then
+        (if (config.boot.loader.timeout == 0) then null else config.boot.loader.timeout)
+        else config.boot.loader.timeout;
 
       example = 4;