Merge pull request #110739 from matthewbauer/fix-binfmt-nix-sandbox

nixos/binfmt: add bash to sandboxPaths

authored by Matthew Bauer and committed by GitHub e8338c9c a979486b

+2 -2
+2 -2
nixos/modules/system/boot/binfmt.nix
··· 23 23 activationSnippet = name: { interpreter, ... }: '' 24 24 rm -f /run/binfmt/${name} 25 25 cat > /run/binfmt/${name} << 'EOF' 26 - #!/usr/bin/env sh 26 + #!${pkgs.bash}/bin/sh 27 27 exec -- ${interpreter} "$@" 28 28 EOF 29 29 chmod +x /run/binfmt/${name} ··· 266 266 extra-platforms = ${toString (cfg.emulatedSystems ++ lib.optional pkgs.stdenv.hostPlatform.isx86_64 "i686-linux")} 267 267 ''; 268 268 nix.sandboxPaths = lib.mkIf (cfg.emulatedSystems != []) 269 - ([ "/run/binfmt" ] ++ (map (system: dirOf (dirOf (getEmulator system))) cfg.emulatedSystems)); 269 + ([ "/run/binfmt" "${pkgs.bash}" ] ++ (map (system: dirOf (dirOf (getEmulator system))) cfg.emulatedSystems)); 270 270 271 271 environment.etc."binfmt.d/nixos.conf".source = builtins.toFile "binfmt_nixos.conf" 272 272 (lib.concatStringsSep "\n" (lib.mapAttrsToList makeBinfmtLine config.boot.binfmt.registrations));