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)