Remove boot.loader.grub.timeout and boot.loader.gummiboot.timeout

There is a generic boot.loader.timeout option.

+12 -31
+1 -1
nixos/modules/installer/cd-dvd/iso-image.nix
··· 79 79 echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} nomodeset" >> $out/loader/entries/nixos-livecd-nomodeset.conf 80 80 81 81 echo "default nixos-livecd" > $out/loader/loader.conf 82 - echo "timeout ${builtins.toString config.boot.loader.gummiboot.timeout}" >> $out/loader/loader.conf 82 + echo "timeout ${builtins.toString config.boot.loader.timeout}" >> $out/loader/loader.conf 83 83 ''; 84 84 85 85 efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools pkgs.libfaketime ]; }
+2
nixos/modules/rename.nix
··· 34 34 # Old Grub-related options. 35 35 (mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]) 36 36 (mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ]) 37 + (mkRenamedOptionModule [ "boot" "loader" "grub" "timeout" ] [ "boot" "loader" "timeout" ]) 38 + (mkRenamedOptionModule [ "boot" "loader" "gummiboot" "timeout" ] [ "boot" "loader" "timeout" ]) 37 39 38 40 # smartd 39 41 (mkRenamedOptionModule [ "services" "smartd" "deviceOpts" ] [ "services" "smartd" "defaults" "monitored" ])
+2 -9
nixos/modules/system/boot/loader/grub/grub.nix
··· 48 48 bootPath = args.path; 49 49 storePath = config.boot.loader.grub.storePath; 50 50 bootloaderId = if args.efiBootloaderId == null then "NixOS${efiSysMountPoint'}" else args.efiBootloaderId; 51 + timeout = if config.boot.loader.timeout == null then -1 else config.boot.loader.timeout; 51 52 inherit efiSysMountPoint; 52 53 inherit (args) devices; 53 54 inherit (efi) canTouchEfiVariables; 54 55 inherit (cfg) 55 56 version extraConfig extraPerEntryConfig extraEntries 56 - extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels timeout 57 + extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels 57 58 default fsIdentifier efiSupport gfxmodeEfi gfxmodeBios; 58 59 path = (makeBinPath ([ 59 60 pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils pkgs.btrfs-progs ··· 310 311 Whether the GRUB menu builder should copy kernels and initial 311 312 ramdisks to /boot. This is done automatically if /boot is 312 313 on a different partition than /. 313 - ''; 314 - }; 315 - 316 - timeout = mkOption { 317 - default = if (config.boot.loader.timeout != null) then config.boot.loader.timeout else -1; 318 - type = types.int; 319 - description = '' 320 - Timeout (in seconds) until GRUB boots the default menu item. 321 314 ''; 322 315 }; 323 316
+1 -15
nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
··· 16 16 17 17 nix = config.nix.package.out; 18 18 19 - timeout = if cfg.timeout != null then cfg.timeout else ""; 19 + timeout = if config.boot.loader.timeout != null then config.boot.loader.timeout else ""; 20 20 21 21 inherit (efi) efiSysMountPoint canTouchEfiVariables; 22 22 }; ··· 28 28 type = types.bool; 29 29 30 30 description = "Whether to enable the gummiboot UEFI boot manager"; 31 - }; 32 - 33 - timeout = mkOption { 34 - default = if config.boot.loader.timeout == null then 10000 else config.boot.loader.timeout; 35 - 36 - example = 4; 37 - 38 - type = types.nullOr types.int; 39 - 40 - description = '' 41 - Timeout (in seconds) for how long to show the menu (null if none). 42 - Note that even with no timeout the menu can be forced if the space 43 - key is pressed during bootup 44 - ''; 45 31 }; 46 32 }; 47 33
+1 -1
nixos/modules/virtualisation/amazon-image.nix
··· 32 32 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd. 33 33 boot.loader.grub.version = if cfg.hvm then 2 else 1; 34 34 boot.loader.grub.device = if cfg.hvm then "/dev/xvda" else "nodev"; 35 - boot.loader.grub.timeout = 0; 36 35 boot.loader.grub.extraPerEntryConfig = mkIf (!cfg.hvm) "root (hd0)"; 36 + boot.loader.timeout = 0; 37 37 38 38 boot.initrd.postDeviceCommands = 39 39 ''
+2 -2
nixos/modules/virtualisation/azure-common.nix
··· 10 10 boot.kernelParams = [ "console=ttyS0" "earlyprintk=ttyS0" "rootdelay=300" "panic=1" "boot.panic_on_fail" ]; 11 11 boot.initrd.kernelModules = [ "hv_vmbus" "hv_netvsc" "hv_utils" "hv_storvsc" ]; 12 12 13 - # Generate a GRUB menu. 13 + # Generate a GRUB menu. 14 14 boot.loader.grub.device = "/dev/sda"; 15 15 boot.loader.grub.version = 2; 16 - boot.loader.grub.timeout = 0; 16 + boot.loader.timeout = 0; 17 17 18 18 # Don't put old configurations in the GRUB menu. The user has no 19 19 # way to select them anyway.
+1 -1
nixos/modules/virtualisation/brightbox-image.nix
··· 94 94 95 95 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd. 96 96 boot.loader.grub.device = "/dev/vda"; 97 - boot.loader.grub.timeout = 0; 97 + boot.loader.timeout = 0; 98 98 99 99 # Don't put old configurations in the GRUB menu. The user has no 100 100 # way to select them anyway.
+1 -1
nixos/modules/virtualisation/google-compute-image.nix
··· 102 102 103 103 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd. 104 104 boot.loader.grub.device = "/dev/sda"; 105 - boot.loader.grub.timeout = 0; 105 + boot.loader.timeout = 0; 106 106 107 107 # Don't put old configurations in the GRUB menu. The user has no 108 108 # way to select them anyway.
+1 -1
nixos/modules/virtualisation/nova-image.nix
··· 27 27 28 28 boot.kernelParams = [ "console=ttyS0" ]; 29 29 boot.loader.grub.device = "/dev/vda"; 30 - boot.loader.grub.timeout = 0; 30 + boot.loader.timeout = 0; 31 31 32 32 # Allow root logins 33 33 services.openssh.enable = true;