Move bookmark building command into separate nix file

Copy bookmark stylesheet to out directory as well
This commit is contained in:
Evie Litherland-Smith 2024-04-08 17:43:11 +01:00
parent 29056aa92e
commit 3c515ba2f0
2 changed files with 11 additions and 5 deletions

View file

@ -0,0 +1,10 @@
{
runCommand,
emacs,
}:
runCommand "bookmarks" {} ''
mkdir $out
cp ${./default.org} $out/bookmarks.org
cp ${./stylesheet.css} $out/stylesheet.css
${emacs}/bin/emacs -Q $out/bookmarks.org --batch --eval="(cd \"$out\")" -f pwd -f org-html-export-to-html --kill
''

View file

@ -81,11 +81,7 @@
Homepage = {
Locked = true;
StartPage = "homepage-locked";
URL = "file://${pkgs.runCommand "bookmarks" {} ''
mkdir $out
cp ${./bookmarks/default.org} $out/bookmarks.org
${pkgs.emacs}/bin/emacs -Q $out/bookmarks.org --batch --eval="(cd \"$out\")" -f pwd -f org-html-export-to-html --kill
''}/bookmarks.html";
URL = "file://${(pkgs.callPackage ./bookmarks/default.nix {})}/bookmarks.html";
};
NewTabPage = true;
NoDefaultBookmarks = true;