This commit is contained in:
commit
95a533c876
451 changed files with 18255 additions and 0 deletions
49
docs/tips/dependency-tracing.md
Normal file
49
docs/tips/dependency-tracing.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Dependency Tracing
|
||||
|
||||
Dependency tracing in Nix allows you to understand the relationships between packages in your system configuration.
|
||||
|
||||
## Forward Path Tracing
|
||||
|
||||
This section answers the question: "*What are the dependencies of an installed package?*"
|
||||
|
||||
Print a store path's dependency tree with:
|
||||
|
||||
```bash
|
||||
nix-store --query --tree /nix/store/...
|
||||
```
|
||||
|
||||
Get a package's store path with:
|
||||
|
||||
> Replace `YOUR_CONFIG` with the name of your NixOS or Home Manager configuration, and `PACKAGE` with the name of the package you want to analyze.
|
||||
|
||||
##### NixOS
|
||||
|
||||
```bash
|
||||
nix path-info ~/.config/nixos#nixosConfigurations.YOUR_CONFIG.pkgs.PACKAGE
|
||||
```
|
||||
|
||||
##### Home Manager
|
||||
|
||||
```bash
|
||||
nix path-info ~/.config/nixos#homeConfigurations.YOUR_CONFIG.pkgs.PACKAGE
|
||||
```
|
||||
|
||||
## Backward Path Tracing
|
||||
|
||||
This section answers the question: "*What are parents of an installed package?*" or "*Why is a certain package installed?*"
|
||||
|
||||
Print a package's dependency path with:
|
||||
|
||||
> Replace `YOUR_CONFIG` with the name of your NixOS or Home Manager configuration, and `PACKAGE` with the name of the package you want to analyze.
|
||||
|
||||
##### NixOS
|
||||
|
||||
```bash
|
||||
nix why-depends --derivation ~/.config/nixos#nixosConfigurations.YOUR_CONFIG.config.system.build.toplevel ~/.config/nixos#nixosConfigurations.YOUR_CONFIG.pkgs.PACKAGE
|
||||
```
|
||||
|
||||
##### Home Manager
|
||||
|
||||
```bash
|
||||
nix why-depends --derivation ~/.config/nixos#homeConfigurations.YOUR_CONFIG.activationPackage ~/.config/nixos#homeConfigurations.YOUR_CONFIG.pkgs.PACKAGE
|
||||
```
|
||||
23
docs/tips/useful-links.md
Normal file
23
docs/tips/useful-links.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Useful Links
|
||||
|
||||
A collection of links regarding Nix/NixOS.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Nix Pills](https://nixos.org/guides/nix-pills/): An introduction to Nix, ported to the current format.
|
||||
- [NixOS & Flakes Book](https://nixos-and-flakes.thiscute.world/): An unofficial book for beginners.
|
||||
- [Noogle](https://noogle.dev/): Search Nix functions.
|
||||
- [nix-lib](https://teu5us.github.io/nix-lib.html): Nix (builtins) & Nixpkgs (lib) functions.
|
||||
- [nix.dev](https://nix.dev/): Official documentation for the Nix ecosystem.
|
||||
|
||||
## Tools
|
||||
|
||||
- [NüschtOS search](https://github.com/NuschtOS/search): Simple and fast static-page NixOS option search.
|
||||
- [compose2nix](https://github.com/aksiksi/compose2nix): Generate a NixOS config from a Docker Compose project.
|
||||
- [manix](https://github.com/mlvzk/manix): A fast CLI documentation searcher for Nix.
|
||||
- [nix-tree](https://github.com/utdemir/nix-tree): Interactively browse dependency graphs of Nix derivations.
|
||||
- [tex2nix](https://github.com/rgri/tex2nix): Generate texlive nix expressions for documents.
|
||||
|
||||
## NixOS configurations
|
||||
|
||||
- [srvos](https://github.com/nix-community/srvos): NixOS profiles for servers.
|
||||
Loading…
Add table
Add a link
Reference in a new issue