From 7ebf6be3a3e3a45213aa9c8c5a7d265fca3760c0 Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 3 Oct 2024 21:24:30 +0200 Subject: [PATCH] feat(aspen/web/orgExportHTML): allow bringing your own config.el `configFile` is chosen to match the terminology used in NixOS modules. I think this is quite useful since you can do a lot via the config file since you can not only set the HTML export setting via the org file header, but also through various emacs variables (see ). Change-Id: If4d66348e3043f62782106e7fd34f5cf5c7071a4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12651 Reviewed-by: aspen Autosubmit: sterni Tested-by: BuildkiteCI --- users/aspen/web/orgExportHTML.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/users/aspen/web/orgExportHTML.nix b/users/aspen/web/orgExportHTML.nix index 3156b527e..c0c94a764 100644 --- a/users/aspen/web/orgExportHTML.nix +++ b/users/aspen/web/orgExportHTML.nix @@ -8,6 +8,7 @@ opts: let src = if isAttrs opts then opts.src else opts; headline = if isAttrs opts then opts.headline else null; + configFile = opts.configFile or ./config.el; bn = builtins.baseNameOf src; filename = elemAt (splitString "." bn) 0; @@ -37,7 +38,7 @@ runCommand outName { inherit src; } '' buildFile() { cp "$1" file.org ${pkgs.emacs}/bin/emacs --batch \ - --load ${./config.el} \ + --load ${configFile} \ --visit file.org \ --eval "(progn ${escapeDoubleQuotes navToHeadline}