Reapply "remove nix_shell_legacy"

This reverts commit c5001f19fc.
This commit is contained in:
Jörg Thalheim
2025-04-21 13:03:25 +02:00
parent 7c57b853e6
commit 723d72255c
24 changed files with 91 additions and 119 deletions

View File

@@ -14,7 +14,7 @@ from clan_cli.completions import (
)
from clan_cli.errors import ClanError
from clan_cli.machines.machines import Machine
from clan_cli.nix import nix_shell_legacy
from clan_cli.nix import nix_shell
from clan_cli.ssh.host import Host, is_ssh_reachable
from clan_cli.ssh.host_key import HostKeyCheck
from clan_cli.ssh.parse import parse_deployment_address
@@ -65,8 +65,8 @@ def find_reachable_host(
def qrcode_scan(picture_file: Path) -> str:
cmd = nix_shell_legacy(
["nixpkgs#zbar"],
cmd = nix_shell(
["zbar"],
[
"zbarimg",
"--quiet",

View File

@@ -10,7 +10,7 @@ from dataclasses import dataclass
from clan_cli.async_run import AsyncRuntime
from clan_cli.cmd import Log, RunOpts, run
from clan_cli.errors import TorConnectionError, TorSocksError
from clan_cli.nix import nix_shell_legacy
from clan_cli.nix import nix_shell
log = logging.getLogger(__name__)
@@ -116,8 +116,8 @@ def spawn_tor(runtime: AsyncRuntime) -> None:
def start_tor() -> None:
"""Starts Tor process using nix-shell."""
cmd_args = ["tor", "--HardwareAccel", "1"]
packages = ["nixpkgs#tor"]
cmd = nix_shell_legacy(packages, cmd_args)
packages = ["tor"]
cmd = nix_shell(packages, cmd_args)
runtime.async_run(None, run, cmd, RunOpts(log=Log.BOTH))
log.debug("Attempting to start Tor")