tasks.py: fix deploy username

This commit is contained in:
zowoq 2024-03-07 09:16:59 +10:00
parent 665119c2ea
commit 5436700dd8

View file

@ -23,11 +23,13 @@ def deploy_nixos(hosts: List[DeployHost]) -> None:
if "darwin" in h.host:
# don't use sudo for darwin-rebuild
command = "darwin-rebuild"
target = f"{h.user}@{h.host}"
else:
command = "sudo nixos-rebuild"
target = f"{h.host}"
res = h.run_local(
["nix", "flake", "archive", "--to", f"ssh://{h.user}@{h.host}", "--json"],
["nix", "flake", "archive", "--to", f"ssh://{target}", "--json"],
stdout=subprocess.PIPE,
)
data = json.loads(res.stdout)