From 3de7bccd4aeaedebf5ae4217db989cc607e52dde Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Mon, 20 Jan 2025 02:18:03 -0800 Subject: [PATCH] nixos/systemd-boot: strip newline from machine-id To make each line in the entry file consistent, strip the newline from the machine-id content. --- .../system/boot/loader/systemd-boot/systemd-boot-builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 421fde5b07af..380ac69bdf7e 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 @@ -277,7 +277,7 @@ def get_profiles() -> list[str]: def install_bootloader(args: argparse.Namespace) -> None: try: with open("/etc/machine-id") as machine_file: - machine_id = machine_file.readlines()[0] + machine_id = machine_file.readlines()[0].strip() except IOError as e: if e.errno != errno.ENOENT: raise