Merge pull request 'machines update: remove unecessary special handling for non-path flakes' (#2640) from DavHau/clan-core:DavHau-dave into main
This commit is contained in:
@@ -44,14 +44,10 @@ def upload_sources(machine: Machine) -> str:
|
|||||||
str(machine.flake.path) if machine.flake.is_local() else machine.flake.url
|
str(machine.flake.path) if machine.flake.is_local() else machine.flake.url
|
||||||
)
|
)
|
||||||
flake_data = nix_metadata(flake_url)
|
flake_data = nix_metadata(flake_url)
|
||||||
url = flake_data["resolvedUrl"]
|
|
||||||
has_path_inputs = any(
|
has_path_inputs = any(
|
||||||
is_path_input(node) for node in flake_data["locks"]["nodes"].values()
|
is_path_input(node) for node in flake_data["locks"]["nodes"].values()
|
||||||
)
|
)
|
||||||
if not has_path_inputs and not is_path_input(flake_data):
|
|
||||||
# No need to upload sources, we can just build the flake url directly
|
|
||||||
# FIXME: this might fail for private repositories?
|
|
||||||
return url
|
|
||||||
if not has_path_inputs:
|
if not has_path_inputs:
|
||||||
# Just copy the flake to the remote machine, we can substitute other inputs there.
|
# Just copy the flake to the remote machine, we can substitute other inputs there.
|
||||||
path = flake_data["path"]
|
path = flake_data["path"]
|
||||||
|
|||||||
Reference in New Issue
Block a user