From 2d293c04dbf01072867bb4540bc00a72c66fd5eb Mon Sep 17 00:00:00 2001 From: magicquark <198001825+magicquark@users.noreply.github.com> Date: Sat, 6 Dec 2025 06:09:42 +0000 Subject: [PATCH] nixos/virtualisation/podman: fix negated logic - !stdenv.buildPlatform.canExecute stdenv.hostPlatform is incorrect. - Example: buildPlatform = x86_64, hostPlatform = aarch64, x86_64 cannot execute (without emulation) aarch64 so this results in !false, which is true. This means that the optional string is inserted and x86_64 will try to run aarch64 docker. --- nixos/modules/virtualisation/podman/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/podman/default.nix b/nixos/modules/virtualisation/podman/default.nix index df5d3e27acfb..21a0e083d871 100644 --- a/nixos/modules/virtualisation/podman/default.nix +++ b/nixos/modules/virtualisation/podman/default.nix @@ -35,7 +35,7 @@ let ln -s $f $man/share/man/man1/$basename done '' - + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' export HOME=$(mktemp -d) # work around `docker ` installShellCompletion --cmd docker \ --bash <($out/bin/docker completion bash) \