From 94fad32e4107573db3cafc8612d3694489a8edf4 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 11 Sep 2018 21:23:11 +0200 Subject: [PATCH] emacs: add internal `finalPackage` option (cherry picked from commit 50de1a6885dc7c306fa85c3c4538ee8ba54a65f7) --- modules/programs/emacs.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/programs/emacs.nix b/modules/programs/emacs.nix index eb12ae19c..87f47a76a 100644 --- a/modules/programs/emacs.nix +++ b/modules/programs/emacs.nix @@ -33,10 +33,19 @@ in example = literalExample "epkgs: [ epkgs.emms epkgs.magit ]"; description = "Extra packages available to Emacs."; }; + + finalPackage = mkOption { + type = types.package; + internal = true; + readOnly = true; + description = "The Emacs package including any extra packages."; + }; }; }; config = mkIf cfg.enable { - home.packages = [ (emacsWithPackages cfg.extraPackages) ]; + home.packages = [ cfg.finalPackage ]; + + programs.emacs.finalPackage = emacsWithPackages cfg.extraPackages; }; }