Skip to content

feat(obsidian): register wiki vault with cross-platform path - #1442

Merged
shunkakinoki merged 1 commit into
mainfrom
feat/obsidian-vault-config
Apr 12, 2026
Merged

feat(obsidian): register wiki vault with cross-platform path#1442
shunkakinoki merged 1 commit into
mainfrom
feat/obsidian-vault-config

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Apr 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • 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 on the vault so the headless daemon auto-opens it on startup, enabling the Obsidian CLI
  • Enable the config on both isKyber and isGalactica (was kyber-only)

Test plan

  • Verified obsidian help works on kyber after make switch + service restart
  • Verify on galactica after next make switch

Summary by cubic

Registers the Obsidian wiki vault with a cross‑platform path and auto‑opens it on startup to enable the headless obsidian CLI. Fixes “Vault not found” on kyber and galactica.

  • New Features
    • Dynamically generates obsidian.json via Nix using config.home.homeDirectory so the vault path resolves on both hosts.
    • Enables the config on kyber and galactica; sets open = true so the daemon opens the vault automatically.

Written for commit e29ed90. Summary will update on new commits.

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.
@mesa-dot-dev

mesa-dot-dev Bot commented Apr 12, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@coderabbitai

coderabbitai Bot commented Apr 12, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eaf3ff08-3679-472a-8a39-080016dc4e97

📥 Commits

Reviewing files that changed from the base of the PR and between cb8a832 and e29ed90.

📒 Files selected for processing (2)
  • config/obsidian/default.nix
  • dotagents

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Extended Obsidian configuration support to additional host systems
    • Updated dotagents dependency

Walkthrough

The 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

Cohort / File(s) Summary
Obsidian Configuration
config/obsidian/default.nix
Module updated to accept config and pkgs parameters; obsidian.json now dynamically generated via pkgs.writeText and builtins.toJSON instead of using static file; enablement condition expanded to support both Kyber and Galactica hosts; generated configuration explicitly sets cli = true and defines vaults.wiki with path derived from config.home.homeDirectory.
Submodule Reference
dotagents
Git submodule commit reference advanced to a newer version.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #1336: Updates the dotagents git submodule reference to a different commit
  • #1409: Updates the dotagents git submodule reference to another commit version

Poem

🐰 A rabbit hops through configs new,
Obsidian blooms in JSON dew,
Galactica joins the vaulted way,
While agents dance in fresh array. 🌙✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/obsidian-vault-config

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shunkakinoki
shunkakinoki merged commit e609bb6 into main Apr 12, 2026
23 of 28 checks passed
@shunkakinoki
shunkakinoki deleted the feat/obsidian-vault-config branch April 12, 2026 09:39
@mesa-dot-dev

mesa-dot-dev Bot commented Apr 12, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Dynamically generate obsidian.json via Nix for cross-platform vault path resolution, enable auto-opening for the Obsidian CLI, and activate the config for both kyber and galactica.

What changed?

  • Generated obsidian.json dynamically via Nix using config.home.homeDirectory to correctly resolve the vault path on kyber and galactica.
  • Set open = true on the vault to enable the headless daemon to auto-open it on startup, enabling the Obsidian CLI.
  • Enabled the configuration on both isKyber and isGalactica (previously kyber-only).

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment on lines 20 to 23
xdg.configFile."obsidian/obsidian.json" = {
source = ./obsidian.json;
enable = isKyber;
source = obsidianJson;
enable = enabled;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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;
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant