about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2024-05-15 08:58:12 +0200
committerGitHub <noreply@github.com>2024-05-15 08:58:12 +0200
commitec2ac8ec825451dd9941e57a481b5b2e62fa42a0 (patch)
tree494bfaee05ce9c3ab94bc571e815ecdb1f24da94 /nixos
parentdd3bc77a501b89cb8bac310dd05098ed7d320aec (diff)
parent1f873183b8e3d092ce74ffe81bba2c2435f0b4a5 (diff)
Merge pull request #275485 from Ex-32/binfmt-emulatedsystems-fix
nixos/binfmt: added assertion to prevent emulation of current system
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/binfmt.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix
index 3605ce56910ed..572bfeda7a8ff 100644
--- a/nixos/modules/system/boot/binfmt.nix
+++ b/nixos/modules/system/boot/binfmt.nix
@@ -280,7 +280,7 @@ in {
   };
 
   config = {
-    boot.binfmt.registrations = builtins.listToAttrs (map (system: {
+    boot.binfmt.registrations = builtins.listToAttrs (map (system: assert system != pkgs.system; {
       name = system;
       value = { config, ... }: let
         interpreter = getEmulator system;