You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I don't know if nix-tree would be an appropriate place for this kind of a "generic" feature, but I think it'd be lovely to be able to do something like this:
Or adding a --graphviz parameter to a flake-aware command like nix store ls or nix path-info.
But on the other hand it really wouldn't be hard to add it to nix-tree, as we have all the dependency graph right there; we just need to print it. I gave it a go on ud/dot branch, can you check it out if it works for you?
nix run 'github:utdemir/nix-tree?ref=ud/dot' -- --derivation .#nixosConfigurations.$(hostname).config.system.build.toplevel --dot | xdot -i
Currently it prints out a simple dot file without any styling, formatting, and it doesn't look very pretty to be honest:
So, I am happy to merge it as-is, or let me know if you have any other suggestions to make it better :).
Sorry about disappearing. Yes I think --dot and passing the "flake references" through is good. The graphviz format can be parsed by external tools (e.g. python's networkx), and doesn't seem to include any data other than what nix-tree already deals with. Wouldn't make sense to do more special-casing in nix-tree, and definitely not in the nix repo (nix path-info ... --dot doesn't sound unreasonable, but the nix cli is already overloaded).
Hi! I don't know if
nix-tree
would be an appropriate place for this kind of a "generic" feature, but I think it'd be lovely to be able to do something like this:❯ nix shell nixpkgs#nix-du nixpkgs#xdot ❯ nix-tree --derivation .#nixosConfigurations.$(hostname).config.system.build.toplevel --graphviz | xdot -i
...and
nix-tree
already provides the convenient interface of "installables" for the task of enumerating the full closureJust to give an idea of what output I'm looking for, here's a screenshot for
❯ nix-du -s=500MB | xdot -
The text was updated successfully, but these errors were encountered: