summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@nullring.xyz>2026-03-03 22:05:26 -0800
committerPreston Pan <ret2pop@nullring.xyz>2026-03-03 22:05:26 -0800
commit4dc487e777f2b7900bd4e4d57205a1a4829c3401 (patch)
tree5a841ceaa06a0af37deef44893005810ad214f26
parentc082f1c0a92ba6212f664ee425dfcb2dd5cc5e38 (diff)
fix remaining links; try publish-org-roam-ui
-rw-r--r--README.org2
-rw-r--r--flake.nix74
-rw-r--r--mindmap/emergence.org2
3 files changed, 75 insertions, 3 deletions
diff --git a/README.org b/README.org
index edab194..d22f987 100644
--- a/README.org
+++ b/README.org
@@ -16,7 +16,7 @@ as well as writing a lot of things with a literate config. To see more, see my
** So, where is this website of yours located?
https://ret2pop.net, it is the road to enlightenment.
* Wait, so where are your dotfiles?
-To use my dotfiles, download the [[file:nix-installer.iso][ISO image]] for the installer. Note that you can validate the ISO image with the [[file:nix-installer.iso.sha256][checksum file]] provided:
+To use my dotfiles, download the [[file:robots.txt][ISO image]] (link broken temporarily) for the installer. Note that you can validate the ISO image with the checksum provided:
#+begin_src bash
sha256sum -c nix-installer.iso.sha256
#+end_src
diff --git a/flake.nix b/flake.nix
index bd17568..7e92ba2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,9 +8,18 @@
inputs.nixpkgs.follows = "nixpkgs";
};
hyprnixmacs.url = "git://nullring.xyz/hyprnixmacs.git";
+
+ publish-org-roam-ui = {
+ url = "git://nullring.xyz/publish-org-roam-ui.git";
+ flake = false;
+ };
+ org-roam-ui = {
+ url = "github:ikoamu/org-roam-ui/publish-org-roam-ui";
+ flake = false;
+ };
};
- outputs = { nixpkgs, git-hooks, hyprnixmacs, self, ... }:
+ outputs = { nixpkgs, git-hooks, hyprnixmacs, self, publish-org-roam-ui, org-roam-ui, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
@@ -35,6 +44,41 @@ fi
};
};
};
+ publish-deps = pkgs.stdenv.mkDerivation {
+ name = "publish-scripts-node-modules";
+ src = publish-org-roam-ui; # <-- Changed this line
+ nativeBuildInputs = [ pkgs.nodejs ];
+ buildPhase = ''
+ export HOME=$TMPDIR
+ npm install
+ npm install fuse.js
+ '';
+ installPhase = ''
+ mkdir -p $out
+ cp -r node_modules $out/
+ '';
+ outputHashMode = "recursive";
+ outputHashAlgo = "sha256";
+ outputHash = pkgs.lib.fakeHash;
+ };
+
+ org-roam-ui-deps = pkgs.stdenv.mkDerivation {
+ name = "org-roam-ui-node-modules";
+ src = org-roam-ui;
+ nativeBuildInputs = [ pkgs.yarn pkgs.nodejs ];
+ buildPhase = ''
+ export HOME=$TMPDIR
+ yarn config set cache-folder $TMPDIR/.yarn-cache
+ yarn install
+ '';
+ installPhase = ''
+ mkdir -p $out
+ cp -r node_modules $out/
+ '';
+ outputHashMode = "recursive";
+ outputHashAlgo = "sha256";
+ outputHash = pkgs.lib.fakeHash; # We will update this after the first run!
+ };
emacsPackages = import "${hyprnixmacs}/modules/home/emacs-packages.nix";
ci-emacs = pkgs.emacs-nox.pkgs.withPackages emacsPackages;
@@ -49,6 +93,7 @@ fi
pkgs.sqlite
pkgs.ghostscript
pkgs.imagemagick
+ pkgs.jq
(pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-full
@@ -123,6 +168,33 @@ emacs -q --batch \
--eval '(add-hook (quote org-publish-after-export-hook) (lambda (file) (font-lock-ensure)))' \
--eval '(org-publish-all t)' \
--eval '(org-publish-all nil)' || (echo "FAIL:" && cat /build/*.log && exit 1)
+
+echo "Setting up Org-Roam-UI..."
+export NIX_ENV=1
+export ROAM_DB_PATH=$HOME/.emacs.d/org-roam.db
+export ROAM_IMG_PATH=$HOME/monorepo/mindmap/img
+export ROAM_PATH=$HOME/monorepo/mindmap
+export UI_SRC=${org-roam-ui}
+
+cp -r ${publish-org-roam-ui} $HOME/publish-script
+chmod -R +w $HOME/publish-script
+cd $HOME/publish-script
+
+# Inject NPM modules safely
+cp -r ${publish-deps}/node_modules ./node_modules
+chmod -R +w ./node_modules
+
+# Run the patched local.sh
+bash local.sh || echo "Graph script hit a non-fatal error"
+
+# Inject Yarn modules safely
+cp -r ${org-roam-ui-deps}/node_modules ./org-roam-ui/node_modules
+chmod -R +w ./org-roam-ui/node_modules
+
+cd org-roam-ui/standalone
+bash build-standalone-server.sh ../..
+
+cp -r ../../out $HOME/website_html/graph_view
'';
installPhase = ''
diff --git a/mindmap/emergence.org b/mindmap/emergence.org
index 08cdc39..95fd832 100644
--- a/mindmap/emergence.org
+++ b/mindmap/emergence.org
@@ -3,7 +3,7 @@
:END:
#+title: emergence
#+author: Preston Pan
-#+html_head: <link rel="stylesheet" type="text/css" href="style.css" />
+#+html_head: <link rel="stylesheet" type="text/css" href="../style.css" />
#+html_head: <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
#+html_head: <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
#+options: broken-links:t