Organize home-manager options/fix extraBinPackages
`extraBinPackages` was not passed from the home-manager module to the derivation. Thanks to @he-la for noticing and reporting this. Group and order the options to hopefully make this easier to spot in the future.
This commit is contained in:
parent
764953de63
commit
6beecfff56
1 changed files with 42 additions and 36 deletions
|
|
@ -23,14 +23,8 @@ in {
|
|||
programs.doom-emacs = {
|
||||
enable = mkEnableOption "Doom Emacs";
|
||||
|
||||
emacs = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.emacs;
|
||||
defaultText = literalExpression "pkgs.emacs";
|
||||
example = literalExpression "pkgs.emacs29-pgtk";
|
||||
description = "The Emacs package to wrap.";
|
||||
};
|
||||
|
||||
# Options passed through to default.nix.
|
||||
# Keep in the same order as default.nix, and in sync with the inherit below!
|
||||
doomDir = mkOption {
|
||||
type = types.path;
|
||||
example = literalExpression "./doom";
|
||||
|
|
@ -49,6 +43,14 @@ in {
|
|||
`XDG_DATA_*`.'';
|
||||
};
|
||||
|
||||
emacs = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.emacs;
|
||||
defaultText = literalExpression "pkgs.emacs";
|
||||
example = literalExpression "pkgs.emacs29-pgtk";
|
||||
description = "The Emacs package to wrap.";
|
||||
};
|
||||
|
||||
profileName = mkOption {
|
||||
type = types.str;
|
||||
default = "nix";
|
||||
|
|
@ -69,18 +71,6 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
provideEmacs = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
If enabled (the default), provide "emacs" (and "emacsclient", etc).
|
||||
If disabled, provide a "doom-emacs" binary.
|
||||
|
||||
Disable this to install doom-emacs in parallel with vanilla Emacs.
|
||||
'';
|
||||
};
|
||||
|
||||
experimentalFetchTree = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
|
@ -100,20 +90,6 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
finalEmacsPackage = mkOption {
|
||||
type = types.package;
|
||||
visible = false;
|
||||
readOnly = true;
|
||||
description = "The final Emacs-compatible package";
|
||||
};
|
||||
|
||||
finalDoomPackage = mkOption {
|
||||
type = types.package;
|
||||
visible = false;
|
||||
readOnly = true;
|
||||
description = "The final doom-emacs package";
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
default = self: [ ];
|
||||
type = hm.types.selectorFunction;
|
||||
|
|
@ -140,6 +116,7 @@ in {
|
|||
Doom cannot specify that package using the '(package! ...)' syntax.
|
||||
'';
|
||||
};
|
||||
|
||||
extraBinPackages = mkOption {
|
||||
default = [
|
||||
config.programs.ripgrep.package
|
||||
|
|
@ -151,14 +128,43 @@ in {
|
|||
"[ programs.ripgrep.package programs.git.package programs.fd.package ]";
|
||||
description = "Extra packages to add to Doom's $PATH.";
|
||||
};
|
||||
|
||||
# Home Manager-specific options.
|
||||
provideEmacs = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
If enabled (the default), provide "emacs" (and "emacsclient", etc).
|
||||
If disabled, provide a "doom-emacs" binary.
|
||||
|
||||
Disable this to install doom-emacs in parallel with vanilla Emacs.
|
||||
'';
|
||||
};
|
||||
|
||||
# Hidden/internal options.
|
||||
finalEmacsPackage = mkOption {
|
||||
type = types.package;
|
||||
visible = false;
|
||||
readOnly = true;
|
||||
description = "The final Emacs-compatible package";
|
||||
};
|
||||
|
||||
finalDoomPackage = mkOption {
|
||||
type = types.package;
|
||||
visible = false;
|
||||
readOnly = true;
|
||||
description = "The final doom-emacs package";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(let
|
||||
doomPackages = doomFromPackages pkgs {
|
||||
inherit (cfg) emacs doomDir doomLocalDir profileName noProfileHack extraPackages
|
||||
experimentalFetchTree;
|
||||
inherit (cfg) doomDir doomLocalDir emacs profileName noProfileHack
|
||||
experimentalFetchTree extraPackages extraBinPackages;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue