diff options
author | Shea Levy <shea@shealevy.com> | 2016-08-16 07:51:58 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2016-08-16 07:51:58 -0400 |
commit | b4954a8f3802ba545933905428a4288622f28294 (patch) | |
tree | e58ea149d7ecf20cbcc9cdcb6bbe6f0a9bd2c428 /nixos/modules/system/boot/loader/systemd-boot | |
parent | 38f306f492e21140d2888c9b6de20d4a5c925387 (diff) |
Deprecate --install-grub in favor of --install-bootloader for nixos-rebuild.
Fixes #14293
Diffstat (limited to 'nixos/modules/system/boot/loader/systemd-boot')
-rw-r--r-- | nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py index c38af1b67f17..c703a3e083ba 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py @@ -7,6 +7,7 @@ import subprocess import glob import tempfile import errno +import warnings def copy_if_not_exists(source, dest): if not os.path.exists(dest): @@ -92,8 +93,11 @@ parser = argparse.ArgumentParser(description='Update NixOS-related systemd-boot parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot') args = parser.parse_args() -# We deserve our own env var! if os.getenv("NIXOS_INSTALL_GRUB") == "1": + 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": if "@canTouchEfiVariables@" == "1": subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "install"]) else: |