diff --git a/system/bookmarks/default.nix b/system/bookmarks/default.nix new file mode 100644 index 00000000..749cee0b --- /dev/null +++ b/system/bookmarks/default.nix @@ -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 +'' diff --git a/system/firefox.nix b/system/firefox.nix index 372800b0..45de3b36 100644 --- a/system/firefox.nix +++ b/system/firefox.nix @@ -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;