clan-cli: don't list non-Clan NixOS configurations
This commit is contained in:
@@ -51,7 +51,7 @@ def complete_machines(
|
|||||||
run(
|
run(
|
||||||
nix_eval(
|
nix_eval(
|
||||||
flags=[
|
flags=[
|
||||||
f"{flake}#nixosConfigurations",
|
f"{flake}#clanInternals.machines.x86_64-linux",
|
||||||
"--apply",
|
"--apply",
|
||||||
"builtins.attrNames",
|
"builtins.attrNames",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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]:
|
def list_nixos_machines(flake_url: str | Path) -> list[str]:
|
||||||
cmd = nix_eval(
|
cmd = nix_eval(
|
||||||
[
|
[
|
||||||
f"{flake_url}#nixosConfigurations",
|
f"{flake_url}#clanInternals.machines.x86_64-linux",
|
||||||
"--apply",
|
"--apply",
|
||||||
"builtins.attrNames",
|
"builtins.attrNames",
|
||||||
"--json",
|
"--json",
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ python3.pkgs.buildPythonApplication {
|
|||||||
installShellCompletion --fish --name clan.fish \
|
installShellCompletion --fish --name clan.fish \
|
||||||
<(${argcomplete}/bin/register-python-argcomplete --shell fish clan)
|
<(${argcomplete}/bin/register-python-argcomplete --shell fish clan)
|
||||||
installShellCompletion --zsh --name _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
|
# Clean up after the package to avoid leaking python packages into a devshell
|
||||||
|
|||||||
Reference in New Issue
Block a user