about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py')
-rw-r--r--nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py6
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: