prefix nixpkgs# explicitly in nix_shell

This makes the function usage less confusing (you can now tell from the call side what are flags and what is passed to nix-shell) and allows to use different flakes to download packages.
This commit is contained in:
Jörg Thalheim
2023-12-08 15:00:11 +01:00
parent af3001a3ac
commit 0e91f8721f
12 changed files with 45 additions and 39 deletions

View File

@@ -11,10 +11,10 @@ def ssh(
password: str | None = None,
ssh_args: list[str] = [],
) -> None:
packages = ["tor", "openssh"]
packages = ["nixpkgs#tor", "nixpkgs#openssh"]
password_args = []
if password:
packages.append("sshpass")
packages.append("nixpkgs#sshpass")
password_args = [
"sshpass",
"-p",
@@ -37,7 +37,7 @@ def qrcode_scan(picture_file: str) -> str:
return (
subprocess.run(
nix_shell(
["zbar"],
["nixpkgs#zbar"],
[
"zbarimg",
"--quiet",