feat(obsidian): register wiki vault with cross-platform path - #1442
Conversation
Generate obsidian.json dynamically via Nix using config.home.homeDirectory so the vault path resolves correctly on both kyber (/home/ubuntu) and galactica (/Users/shunkakinoki). Set open=true so the headless daemon auto-opens the vault on startup, enabling the CLI. Closes the "Vault not found" issue when running `obsidian` commands.
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Disabled knowledge base sources:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe Obsidian module configuration is refactored to dynamically generate its JSON configuration file using Nix, expanding host support from Kyber to include Galactica, and defining a wiki vault path. Additionally, the dotagents git submodule reference is updated to a newer commit. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mesa DescriptionTL;DRDynamically generate What changed?
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Code Review
This pull request updates the Obsidian configuration to support both isKyber and isGalactica hosts by dynamically generating the obsidian.json file and updating the dotagents subproject. Feedback highlights that the Obsidian package and services may still be restricted to isKyber in other modules, and that the configuration file path needs to be adjusted for macOS (isGalactica) to match its platform-specific location instead of the XDG standard.
| let | ||
| inherit (inputs.host) isKyber; | ||
| inherit (inputs.host) isKyber isGalactica; | ||
| enabled = isKyber || isGalactica; |
There was a problem hiding this comment.
The enabled flag is used here to deploy the configuration file, but the obsidian package and its associated headless service are still restricted to isKyber in home-manager/modules/obsidian/default.nix and home-manager/services/obsidian/default.nix. If you intend to use the Obsidian CLI on galactica, you will likely need to enable the package there as well, though the current shim's dependency on xvfb-run and the systemd service are Linux-specific.
| xdg.configFile."obsidian/obsidian.json" = { | ||
| source = ./obsidian.json; | ||
| enable = isKyber; | ||
| source = obsidianJson; | ||
| enable = enabled; | ||
| }; |
There was a problem hiding this comment.
On macOS (isGalactica), Obsidian expects its configuration file at ~/Library/Application Support/obsidian/obsidian.json rather than the XDG standard ~/.config/obsidian/obsidian.json. To ensure the vault is correctly registered on both platforms, you should target the platform-specific path for macOS.
xdg.configFile."obsidian/obsidian.json" = {
source = obsidianJson;
enable = isKyber;
};
home.file."Library/Application Support/obsidian/obsidian.json" = {
source = obsidianJson;
enable = isGalactica;
};
Summary
obsidian.jsondynamically via Nix usingconfig.home.homeDirectoryso the vault path resolves correctly on both kyber (/home/ubuntu) and galactica (/Users/shunkakinoki)open = trueon the vault so the headless daemon auto-opens it on startup, enabling the Obsidian CLIisKyberandisGalactica(was kyber-only)Test plan
obsidian helpworks on kyber aftermake switch+ service restartmake switchSummary by cubic
Registers the Obsidian wiki vault with a cross‑platform path and auto‑opens it on startup to enable the headless
obsidianCLI. Fixes “Vault not found” on kyber and galactica.obsidian.jsonvia Nix usingconfig.home.homeDirectoryso the vault path resolves on both hosts.open = trueso the daemon opens the vault automatically.Written for commit e29ed90. Summary will update on new commits.