From 202e69723315ec54546bea5751ba5f93e0b5fc1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 31 Jan 2024 10:46:03 +0700 Subject: [PATCH] nixos/systemd-boot: fix editor option --- .../system/boot/loader/systemd-boot/systemd-boot-builder.py | 2 +- .../modules/system/boot/loader/systemd-boot/systemd-boot.nix | 4 +--- 2 files changed, 2 insertions(+), 4 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 055afe95df60..a9978d7adf80 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 @@ -18,7 +18,7 @@ from dataclasses import dataclass # These values will be replaced with actual values during the package build EFI_SYS_MOUNT_POINT = "@efiSysMountPoint@" TIMEOUT = "@timeout@" -EDITOR = bool("@editor@") +EDITOR = "@editor@" == "1" CONSOLE_MODE = "@consoleMode@" BOOTSPEC_TOOLS = "@bootspecTools@" DISTRO_NAME = "@distroName@" diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix index a126a6725e1b..ea4553b8208f 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix @@ -22,11 +22,9 @@ let timeout = optionalString (config.boot.loader.timeout != null) config.boot.loader.timeout; - editor = if cfg.editor then "True" else "False"; - configurationLimit = if cfg.configurationLimit == null then 0 else cfg.configurationLimit; - inherit (cfg) consoleMode graceful; + inherit (cfg) consoleMode graceful editor; inherit (efi) efiSysMountPoint canTouchEfiVariables;