From 1c13d31cb801243940b7bb13a6c996007daeb5ab Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Sat, 2 Sep 2023 15:17:37 +0200 Subject: [PATCH] Fix mode loading Signed-off-by: Magic_RB --- flake.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index fa4f994..18d6a86 100644 --- a/flake.nix +++ b/flake.nix @@ -48,12 +48,11 @@ "modus-themes" "org-thtml" "emacs-htmlize" + "magit" "web-mode" "hcl-mode" - "modus-themes" "yaml-mode" "nix-mode" - "magit" "compat" "dash" "s-el" @@ -63,11 +62,18 @@ ]; loadPackages = pkgs: pkgs.writeText "packages.el" - (concatMapStringsSep "\n" (x: '' + ((concatMapStringsSep "\n" (x: '' (if (file-exists-p "${inputs.${x}}/lisp") (add-to-list 'load-path "${inputs.${x}}/lisp") (add-to-list 'load-path "${inputs.${x}}")) - '') packages); + '') packages) + + + "\n" + + + (concatMapStringsSep "\n" (x: '' + (when (string-match-p "^.*-mode$" "${x}") + (require '${x})) + '') packages)); site = pkgs: which: pkgs.stdenv.mkDerivation { name = which; @@ -133,11 +139,6 @@ '' (load-file "${loadPackages pkgs}") - (require 'nix-mode) - (require 'web-mode) - (require 'hcl-mode) - (require 'yaml-mode) - (require 'org) (require 'ox) (require 'ox-html) -- 2.45.2