treewide: convert package options to use mkPackageOption (#7116)
This commit converts `package = mkOption` declarations throughout the
codebase to use the more modern and consistent `lib.mkPackageOption`
function.
Key changes:
- Simple package options: `mkOption { type = types.package; default = pkgs.foo; }`
becomes `lib.mkPackageOption pkgs "foo" { }`
- Package set options: Uses correct package set as first argument with
`pkgsText` parameter (e.g., `lib.mkPackageOption pkgs.vimPlugins "plugin" { pkgsText = "pkgs.vimPlugins"; }`)
- Removes redundant descriptions that just restate the package name
- Preserves examples and extra context where meaningful
- Handles submodule plugin options properly with `null` defaults
This modernizes the option declarations and makes them more consistent
with current nixpkgs patterns while maintaining full backward compatibility.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
a868570581
commit
7419250703
59 changed files with 93 additions and 383 deletions
|
|
@ -19,9 +19,11 @@ let
|
|||
|
||||
pluginModule = types.submodule {
|
||||
options = {
|
||||
plugin = mkOption {
|
||||
type = types.package;
|
||||
description = "Path of the configuration file to include.";
|
||||
plugin = lib.mkPackageOption pkgs.tmuxPlugins "plugin" {
|
||||
example = "pkgs.tmuxPlugins.sensible";
|
||||
default = null;
|
||||
pkgsText = "pkgs.tmuxPlugins";
|
||||
extraDescription = "Path of the configuration file to include.";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue