clan-cli: don't list non-Clan NixOS configurations

This commit is contained in:
Michael Hoang
2024-12-17 14:37:22 +11:00
parent 1b5cb6a5b4
commit e7dcabc5c4
3 changed files with 3 additions and 3 deletions

View File

@@ -51,7 +51,7 @@ def complete_machines(
run(
nix_eval(
flags=[
f"{flake}#nixosConfigurations",
f"{flake}#clanInternals.machines.x86_64-linux",
"--apply",
"builtins.attrNames",
],

View File

@@ -85,7 +85,7 @@ def get_inventory_machine_details(flake_url: Path, machine_name: str) -> Machine
def list_nixos_machines(flake_url: str | Path) -> list[str]:
cmd = nix_eval(
[
f"{flake_url}#nixosConfigurations",
f"{flake_url}#clanInternals.machines.x86_64-linux",
"--apply",
"builtins.attrNames",
"--json",

View File

@@ -195,7 +195,7 @@ python3.pkgs.buildPythonApplication {
installShellCompletion --fish --name clan.fish \
<(${argcomplete}/bin/register-python-argcomplete --shell fish clan)
installShellCompletion --zsh --name _clan \
<(${argcomplete}/bin/register-python-argcomplete --shell bash clan)
<(${argcomplete}/bin/register-python-argcomplete --shell zsh clan)
'';
# Clean up after the package to avoid leaking python packages into a devshell