git.iko.soy/typeable/nixpkgs
on master help sign in
Remove boot.loader.grub.timeout and boot.loader.gummiboot.timeout
32bed83Eelco Dolstra
nixos/modules/installer/cd-dvd/iso-image.nix+1−1
@@ -79,7 +79,7 @@ let
79 echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} nomodeset" >> $out/loader/entries/nixos-livecd-nomodeset.conf
79 echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} nomodeset" >> $out/loader/entries/nixos-livecd-nomodeset.conf
80
80
81 echo "default nixos-livecd" > $out/loader/loader.conf
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 efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools pkgs.libfaketime ]; }
85 efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools pkgs.libfaketime ]; }
nixos/modules/rename.nix+2
@@ -34,6 +34,8 @@ with lib;
34 # Old Grub-related options.
34 # Old Grub-related options.
35 (mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ])
35 (mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ])
36 (mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
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 # smartd
40 # smartd
39 (mkRenamedOptionModule [ "services" "smartd" "deviceOpts" ] [ "services" "smartd" "defaults" "monitored" ])
41 (mkRenamedOptionModule [ "services" "smartd" "deviceOpts" ] [ "services" "smartd" "defaults" "monitored" ])
nixos/modules/system/boot/loader/grub/grub.nix+2−9
@@ -48,12 +48,13 @@ let
48 bootPath = args.path;
48 bootPath = args.path;
49 storePath = config.boot.loader.grub.storePath;
49 storePath = config.boot.loader.grub.storePath;
50 bootloaderId = if args.efiBootloaderId == null then "NixOS${efiSysMountPoint'}" else args.efiBootloaderId;
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 inherit efiSysMountPoint;
52 inherit efiSysMountPoint;
52 inherit (args) devices;
53 inherit (args) devices;
53 inherit (efi) canTouchEfiVariables;
54 inherit (efi) canTouchEfiVariables;
54 inherit (cfg)
55 inherit (cfg)
55 version extraConfig extraPerEntryConfig extraEntries
56 version extraConfig extraPerEntryConfig extraEntries
56− extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels timeout
57+ extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels
57 default fsIdentifier efiSupport gfxmodeEfi gfxmodeBios;
58 default fsIdentifier efiSupport gfxmodeEfi gfxmodeBios;
58 path = (makeBinPath ([
59 path = (makeBinPath ([
59 pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils pkgs.btrfs-progs
60 pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils pkgs.btrfs-progs
@@ -313,14 +314,6 @@ in
313 '';
314 '';
314 };
315 };
315
316
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−
324 default = mkOption {
317 default = mkOption {
325 default = 0;
318 default = 0;
326 type = types.int;
319 type = types.int;
nixos/modules/system/boot/loader/gummiboot/gummiboot.nix+1−15
@@ -16,7 +16,7 @@ let
16
16
17 nix = config.nix.package.out;
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 inherit (efi) efiSysMountPoint canTouchEfiVariables;
21 inherit (efi) efiSysMountPoint canTouchEfiVariables;
22 };
22 };
@@ -29,20 +29,6 @@ in {
29
29
30 description = "Whether to enable the gummiboot UEFI boot manager";
30 description = "Whether to enable the gummiboot UEFI boot manager";
31 };
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 };
32 };
47
33
48 config = mkIf cfg.enable {
34 config = mkIf cfg.enable {
nixos/modules/virtualisation/amazon-image.nix+1−1
@@ -32,8 +32,8 @@ let cfg = config.ec2; in
32 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
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;
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";
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)";
35 boot.loader.grub.extraPerEntryConfig = mkIf (!cfg.hvm) "root (hd0)";
36+ boot.loader.timeout = 0;
37
37
38 boot.initrd.postDeviceCommands =
38 boot.initrd.postDeviceCommands =
39 ''
39 ''
nixos/modules/virtualisation/azure-common.nix+2−2
@@ -10,10 +10,10 @@ with lib;
10 boot.kernelParams = [ "console=ttyS0" "earlyprintk=ttyS0" "rootdelay=300" "panic=1" "boot.panic_on_fail" ];
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" ];
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 boot.loader.grub.device = "/dev/sda";
14 boot.loader.grub.device = "/dev/sda";
15 boot.loader.grub.version = 2;
15 boot.loader.grub.version = 2;
16− boot.loader.grub.timeout = 0;
16+ boot.loader.timeout = 0;
17
17
18 # Don't put old configurations in the GRUB menu. The user has no
18 # Don't put old configurations in the GRUB menu. The user has no
19 # way to select them anyway.
19 # way to select them anyway.
nixos/modules/virtualisation/brightbox-image.nix+1−1
@@ -94,7 +94,7 @@ in
94
94
95 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
95 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
96 boot.loader.grub.device = "/dev/vda";
96 boot.loader.grub.device = "/dev/vda";
97− boot.loader.grub.timeout = 0;
97+ boot.loader.timeout = 0;
98
98
99 # Don't put old configurations in the GRUB menu. The user has no
99 # Don't put old configurations in the GRUB menu. The user has no
100 # way to select them anyway.
100 # way to select them anyway.
nixos/modules/virtualisation/google-compute-image.nix+1−1
@@ -102,7 +102,7 @@ in
102
102
103 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
103 # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
104 boot.loader.grub.device = "/dev/sda";
104 boot.loader.grub.device = "/dev/sda";
105− boot.loader.grub.timeout = 0;
105+ boot.loader.timeout = 0;
106
106
107 # Don't put old configurations in the GRUB menu. The user has no
107 # Don't put old configurations in the GRUB menu. The user has no
108 # way to select them anyway.
108 # way to select them anyway.
nixos/modules/virtualisation/nova-image.nix+1−1
@@ -27,7 +27,7 @@ with lib;
27
27
28 boot.kernelParams = [ "console=ttyS0" ];
28 boot.kernelParams = [ "console=ttyS0" ];
29 boot.loader.grub.device = "/dev/vda";
29 boot.loader.grub.device = "/dev/vda";
30− boot.loader.grub.timeout = 0;
30+ boot.loader.timeout = 0;
31
31
32 # Allow root logins
32 # Allow root logins
33 services.openssh.enable = true;
33 services.openssh.enable = true;