Refactor flake / home-manager common code

Avoids having the emacs-overlay hack in two places.
This commit is contained in:
Marien Zwart 2024-05-11 20:35:42 +10:00
parent f65aa4a718
commit fe4b632478
No known key found for this signature in database
2 changed files with 22 additions and 27 deletions

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{ doomSource, emacsOverlay }:
{ doomFromPackages }:
{ config, options, lib, pkgs, ... }:
let
@ -99,10 +99,7 @@ in {
config = mkIf cfg.enable (mkMerge [
(let
# Hack to avoid pkgs.extend (see flake.nix).
inherit (emacsOverlay {} pkgs) emacsPackagesFor;
doomPackages = pkgs.callPackages ./. {
inherit doomSource emacsPackagesFor;
doomPackages = doomFromPackages pkgs {
inherit (cfg) emacs doomDir doomLocalDir profileName noProfileHack;
};
in