lol

Document how to use packages with extensions. (#145011)

Co-authored-by: Artturi <Artturin@artturin.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>

authored by

x10an14
Artturi
Sandro
Valentin Gagarin
and committed by
GitHub
dc7d4dec 7efb781c

+23
+23
nixos/doc/manual/configuration/customizing-packages.section.md
··· 12 configuration options. 13 ::: 14 15 Apart from high-level options, it's possible to tweak a package in 16 almost arbitrary ways, such as changing or disabling dependencies of a 17 package. For instance, the Emacs package in Nixpkgs by default has a
··· 12 configuration options. 13 ::: 14 15 + ::: {.note} 16 + Alternatively, many packages come with extensions one might add. 17 + Examples include: 18 + - [`passExtensions.pass-otp`](https://search.nixos.org/packages/query=passExtensions.pass-otp) 19 + - [`python310Packages.requests`](https://search.nixos.org/packages/query=python310Packages.requests) 20 + 21 + You can use them like this: 22 + ```nix 23 + environment.systemPackages = with pkgs; [ 24 + sl 25 + (pass.withExtensions (subpkgs: with subpkgs; [ 26 + pass-audit 27 + pass-otp 28 + pass-genphrase 29 + ])) 30 + (python3.withPackages (subpkgs: with subpkgs; [ 31 + requests 32 + ])) 33 + cowsay 34 + ]; 35 + ``` 36 + ::: 37 + 38 Apart from high-level options, it's possible to tweak a package in 39 almost arbitrary ways, such as changing or disabling dependencies of a 40 package. For instance, the Emacs package in Nixpkgs by default has a