Skip to content

Commit

Permalink
Allow using a list of paths in emacsWithPackagesFromUsePackage
Browse files Browse the repository at this point in the history
This permits creating use-package/leaf package lists for full
configuration directories, instead of just single big config files.
  • Loading branch information
TLATER committed Feb 3, 2025
1 parent 969abb7 commit 9971ad4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions elisp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ let
else if type == "string" then config
# - A config path { config = ./config.el; }
else if type == "path" then builtins.readFile config
# - A list of paths { config = [ ./config.el ./custom.el ] }
else if type == "list" then lib.concatMapStringsSep "\n" (fname: builtins.readFile fname) config
# - A derivation { config = pkgs.writeText "config.el" "(use-package foo)"; }
else if lib.isDerivation config then builtins.readFile "${config}"
else throw "Unsupported type for config: \"${type}\"";
Expand Down

0 comments on commit 9971ad4

Please sign in to comment.