From 38ee02a87398793fa11d2f102fcc4d00d1e3191d Mon Sep 17 00:00:00 2001 From: Alex Lyon Date: Mon, 28 Jul 2025 04:12:26 -0700 Subject: [PATCH] nixos/limine: fix installation when using initrd secrets --- nixos/modules/system/boot/loader/limine/limine-install.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/loader/limine/limine-install.py b/nixos/modules/system/boot/loader/limine/limine-install.py index 746cb693409c..21cf817509fc 100644 --- a/nixos/modules/system/boot/loader/limine/limine-install.py +++ b/nixos/modules/system/boot/loader/limine/limine-install.py @@ -145,8 +145,10 @@ def config_entry(levels: int, bootspec: BootSpec, label: str, time: str) -> str: entry += f'module_path: ' + get_kernel_uri(bootspec.initrd) + '\n' if bootspec.initrdSecrets: - initrd_secrets_path = str(limine_install_dir) + '/kernels/' + os.path.basename(bootspec.toplevel) + '-secrets' - os.makedirs(initrd_secrets_path) + base_path = str(limine_install_dir) + '/kernels/' + initrd_secrets_path = base_path + os.path.basename(bootspec.toplevel) + '-secrets' + if not os.path.exists(base_path): + os.makedirs(base_path) old_umask = os.umask(0o137) initrd_secrets_path_temp = tempfile.mktemp(os.path.basename(bootspec.toplevel) + '-secrets')