diff --git a/flake.lock b/flake.lock index 901daf9..f644616 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ ] }, "locked": { - "lastModified": 1661774097, - "narHash": "sha256-dvWpOU3dU9TfSnK7I+CSDrCaASr+uR5VepG/SQs/RIg=", + "lastModified": 1661934387, + "narHash": "sha256-eK/PTfINcn4bVZShPXYEB73kf8OyiUwCMKArVZvOo/k=", "owner": "numtide", "repo": "deploykit", - "rev": "c8cd9ddcd647e3116b07e920e53aebf047cbeac5", + "rev": "8e0ecd709355b4d87cfab35c5d570ab1b0ae0b13", "type": "github" }, "original": { diff --git a/tasks.py b/tasks.py index ff64382..8819dbc 100644 --- a/tasks.py +++ b/tasks.py @@ -18,8 +18,9 @@ def deploy_nixos(hosts: List[DeployHost]) -> None: g = DeployGroup(hosts) def deploy(h: DeployHost) -> None: + target = f"{h.user or 'root'}@{h.host}" h.run_local( - f"rsync {' --exclude '.join([''] + RSYNC_EXCLUDES)} -vaF --delete -e ssh . {h.user}@{h.host}:/etc/nixos" + f"rsync {' --exclude '.join([''] + RSYNC_EXCLUDES)} -vaF --delete -e ssh . {target}:/etc/nixos" ) # FIXME: build03 has itself as a builder and deadlocks building packages. @@ -134,7 +135,7 @@ def nixos_install(c, hosts=""): def get_hosts(hosts: str) -> List[DeployHost]: if hosts == "": - return [DeployHost(f"build{n + 1:02d}.nix-community.org") for n in range(4)] + return [DeployHost(f"build{n + 1:02d}.nix-community.org", user="root") for n in range(4)] return [DeployHost(f"{h}.nix-community.org") for h in hosts.split(",")]