From cb2ccd33a4057ece785b00783932faa1935dd8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 20 May 2025 09:17:29 +0200 Subject: [PATCH] add workaround for nix-copy on darwin --- pkgs/clan-cli/clan_cli/machines/update.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/clan-cli/clan_cli/machines/update.py b/pkgs/clan-cli/clan_cli/machines/update.py index 28328fd1f..0f6c20024 100644 --- a/pkgs/clan-cli/clan_cli/machines/update.py +++ b/pkgs/clan-cli/clan_cli/machines/update.py @@ -58,11 +58,18 @@ def upload_sources(machine: Machine, host: Host) -> str: if not has_path_inputs: # Just copy the flake to the remote machine, we can substitute other inputs there. path = flake_data["path"] + + remote_url = f"ssh-ng://{host.target}" + + # MacOS doesn't come with a proper login shell for ssh and therefore doesn't have nix in $PATH as it doesn't source /etc/profile + if machine._class_ == "darwin": + remote_url += "?remote-program=bash -lc 'exec nix-daemon --stdio'" + cmd = nix_command( [ "copy", "--to", - f"ssh://{host.target}", + remote_url, "--no-check-sigs", path, ]