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