Change:
I was using gummiboot and struggling to figure out how to reinstall it. This option should be aliased and deprecated in favor of "--install-bootloader" or the like, and the manpage updated to be agnostic of the bootloader selected in , since the correct behavior is already in place (--install-grub reinstalls gummiboot properly).

Discussion:
</group> <sbr /> <arg><option>--upgrade</option></arg> <del> <arg><option>--install-grub</option></arg> </del> <ins> <arg><option>--install-bootloader</option></arg> </ins> <arg><option>--no-build-nix</option></arg> <arg><option>--fast</option></arg> <arg><option>--rollback</option></arg>

</varlistentry> <varlistentry> <del> <term><option>--install-grub</option></term> </del> <ins> <term><option>--install-bootloader</option></term> </ins> <listitem> <del> <para>Causes the GRUB boot loader to be (re)installed on the device specified by the <varname>boot.loader.grub.device</varname> configuration option.</para> </del> <ins> <para>Causes the boot loader to be (re)installed on the device specified by the relevant configuration options. </para> </ins> </listitem> </varlistentry>

# configuration. echo "finalising the installation..." if [ -z "$noBootLoader" ]; then <del> NIXOS_INSTALL_GRUB=1 chroot $mountPoint  </del> <ins> NIXOS_INSTALL_BOOTLOADER=1 chroot $mountPoint  </ins> /nix/var/nix/profiles/system/bin/switch-to-configuration boot fi

action="$i" ;; --install-grub) <del> export NIXOS_INSTALL_GRUB=1 </del> <ins> echo "$0: --install-grub deprecated, use --install-bootloader instead" >&2 export NIXOS_INSTALL_BOOTLOADER=1 ;; --install-bootloader) export NIXOS_INSTALL_BOOTLOADER=1 </ins> ;; --no-build-nix) buildNix=

my $versionDiffer = get("fullVersion") ne $prevGrubState->version; my $efiDiffer = $efiTarget ne $prevGrubState->efi; my $efiMountPointDiffer = $efiSysMountPoint ne $prevGrubState->efiMountPoint; <del> my $requireNewInstall = $devicesDiffer || $nameDiffer || $versionDiffer || $efiDiffer || $efiMountPointDiffer || (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1"); </del> <ins> if (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1") { warn "NIXOS_INSTALL_GRUB env var deprecated, use NIXOS_INSTALL_BOOTLOADER"; $ENV{'NIXOS_INSTALL_BOOTLOADER'} = "1"; } my $requireNewInstall = $devicesDiffer || $nameDiffer || $versionDiffer || $efiDiffer || $efiMountPointDiffer || (($ENV{'NIXOS_INSTALL_BOOTLOADER'} // "") eq "1"); </ins> # install a symlink so that grub can detect the boot drive my $tmpDir = File::Temp::tempdir(CLEANUP => 1) or die "Failed to create temporary space";

import glob import tempfile import errno <ins> import warnings </ins> def copy_if_not_exists(source, dest): if not os.path.exists(dest):

parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot') args = parser.parse_args() <del> # We deserve our own env var! </del> if os.getenv("NIXOS_INSTALL_GRUB") == "1": <ins> warnings.warn("NIXOS_INSTALL_GRUB env var deprecated, use NIXOS_INSTALL_BOOTLOADER", DeprecationWarning) os.environ["NIXOS_INSTALL_BOOTLOADER"] = "1" if os.getenv("NIXOS_INSTALL_BOOTLOADER") == "1": </ins> if "@canTouchEfiVariables@" == "1": subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"]) else: