emacs: fix merging of extraPackages and overrides
Because `extraPackages` and `overrides` expect functions as values it has not been possible to perform merges. This adds suitable types for these options that allow reasonable merging.
This commit is contained in:
parent
42732990cd
commit
cf0aad391c
2 changed files with 32 additions and 0 deletions
|
|
@ -4,6 +4,8 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
hmTypes = import ../lib/types.nix { inherit lib; };
|
||||
|
||||
cfg = config.programs.emacs;
|
||||
|
||||
# Copied from all-packages.nix, with modifications to support
|
||||
|
|
@ -34,6 +36,7 @@ in
|
|||
|
||||
extraPackages = mkOption {
|
||||
default = self: [];
|
||||
type = hmTypes.selectorFunction;
|
||||
defaultText = "epkgs: []";
|
||||
example = literalExample "epkgs: [ epkgs.emms epkgs.magit ]";
|
||||
description = "Extra packages available to Emacs.";
|
||||
|
|
@ -41,6 +44,7 @@ in
|
|||
|
||||
overrides = mkOption {
|
||||
default = self: super: {};
|
||||
type = hmTypes.overlayFunction;
|
||||
defaultText = "self: super: {}";
|
||||
example = literalExample ''
|
||||
self: super: rec {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue