drop deploy_as_root check
We haven't documented macOS support yet, so I don't expect many people using it yet. Now that the pull request is merged probably most people starting with darwin-nix will be on that commit anyway, so it's not worth the check, given that the sudo version doesn't work very well.
This commit is contained in:
@@ -109,11 +109,6 @@ def deploy_machine(machine: Machine) -> None:
|
||||
target_host = stack.enter_context(machine.target_host())
|
||||
build_host = stack.enter_context(machine.build_host())
|
||||
|
||||
if machine._class_ == "darwin":
|
||||
if not machine.deploy_as_root and target_host.user == "root":
|
||||
msg = f"'targetHost' should be set to a non-root user for deploying to nix-darwin on machine '{machine.name}'"
|
||||
raise ClanError(msg)
|
||||
|
||||
host = build_host or target_host
|
||||
|
||||
generate_facts([machine], service=None, regenerate=False)
|
||||
@@ -138,7 +133,7 @@ def deploy_machine(machine: Machine) -> None:
|
||||
f"{path}#{machine.name}",
|
||||
]
|
||||
|
||||
become_root = machine.deploy_as_root
|
||||
become_root = True
|
||||
|
||||
if machine._class_ == "nixos":
|
||||
nix_options += [
|
||||
|
||||
Reference in New Issue
Block a user