docs: update beets and description of overriding packages

The beets package no longer has the "enableCheck" option so this was
confusing. Also the word override was used to mean two different
things so I modified the FAQ to use the word "change" and linked to
documentation regarding package overrides.
This commit is contained in:
nbelakovski 2024-03-11 23:07:12 -07:00 committed by Robert Helgesson
parent 601c22f8af
commit 35536fc6d6
No known key found for this signature in database
GPG Key ID: 96E745BD17AA17ED
3 changed files with 29 additions and 7 deletions

View File

@ -6,5 +6,5 @@ faq/session-variables.md
faq/multiple-users-machines.md
faq/ca-desrt-dconf.md
faq/unstable.md
faq/override-package-module.md
faq/change-package-module.md
```

View File

@ -1,4 +1,4 @@
# How do I override the package used by a module? {#_how_do_i_override_the_package_used_by_a_module}
# How do I change the package used by a module? {#_how_do_i_change_the_package_used_by_a_module}
By default Home Manager will install the package provided by your chosen
`nixpkgs` channel but occasionally you might end up needing to change
@ -6,13 +6,35 @@ this package. This can typically be done in two ways.
1. If the module provides a `package` option, such as
`programs.beets.package`, then this is the recommended way to
perform the override. For example,
perform the change. For example,
``` nix
programs.beets.package = pkgs.beets.override { enableCheck = true; };
programs.beets.package = pkgs.beets.override { pluginOverrides = { beatport.enable = false; }; };
```
2. If no `package` option is available then you can typically override
See [Nix pill 17](https://nixos.org/guides/nix-pills/nixpkgs-overriding-packages.html)
for more information on package overrides. Alternatively, if you want
to use the `beets` package from Nixpkgs unstable, then a configuration like
``` nix
{ pkgs, config, ... }:
let
pkgsUnstable = import <nixpkgs-unstable> {};
in
{
programs.beets.package = pkgsUnstable.beets;
# …
}
```
should work OK.
3. If no `package` option is available then you can typically change
the relevant package using an
[overlay](https://nixos.org/nixpkgs/manual/#chap-overlays).

View File

@ -32,8 +32,8 @@ in {
type = types.package;
default = pkgs.beets;
defaultText = literalExpression "pkgs.beets";
example =
literalExpression "(pkgs.beets.override { enableCheck = true; })";
example = literalExpression
"(pkgs.beets.override { pluginOverrides = { beatport.enable = false; }; })";
description = ''
The `beets` package to use.
Can be used to specify extensions.