From 147186a95b7298fd797e0dbf383131632eb595d9 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Wed, 8 Mar 2023 21:07:27 -0800 Subject: [PATCH] nixos/binfmt: fix extension for Windows binaries Extension based matching for Windows targets define it '.exe' but kernel documentation explicitly states it should be passed "without the .". From https://docs.kernel.org/admin-guide/binfmt-misc.html > * magic: > [...] If you chose filename extension matching, this is the > extension to be recognised (without the ., the \x0a specials are not > allowed). --- nixos/modules/system/boot/binfmt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix index 98db67e7c00..cceb02c1a73 100644 --- a/nixos/modules/system/boot/binfmt.nix +++ b/nixos/modules/system/boot/binfmt.nix @@ -134,11 +134,11 @@ let mask = ''\xff\xff\xff\xff''; }; x86_64-windows = { - magicOrExtension = ".exe"; + magicOrExtension = "exe"; recognitionType = "extension"; }; i686-windows = { - magicOrExtension = ".exe"; + magicOrExtension = "exe"; recognitionType = "extension"; }; };