Skip to content

feat: add obsidian CLI config for headless kyber - #1438

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

feat: add obsidian CLI config for headless kyber#1438
shunkakinoki merged 1 commit into
mainfrom
feat/obsidian-cli-config

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Apr 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add config/obsidian/obsidian.json with {"cli": true} to enable Obsidian CLI on headless hosts
  • Deploy via xdg.configFile only on kyber
  • Fix alphabetical ordering in config/default.nix

Context

Obsidian 1.12+ CLI requires cli: true in ~/.config/obsidian/obsidian.json (discovered by extracting the asar - the key is cli, not enabledCli as docs suggest). Without a display server there's no way to toggle this via Settings UI, so we manage it declaratively.

Test plan

  • home-manager switch on kyber deploys ~/.config/obsidian/obsidian.json
  • obsidian list-vaults works without "CLI not enabled" error

Summary by cubic

Enable Obsidian CLI on the headless kyber host by provisioning ~/.config/obsidian/obsidian.json with "cli": true. Also fixes the module list order in config/default.nix.

  • New Features

    • Adds config/obsidian to deploy xdg.configFile."obsidian/obsidian.json" with "cli": true, enabled only when isKyber is true.
  • Refactors

    • Alphabetizes entries in config/default.nix.

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

Copilot AI review requested due to automatic review settings April 12, 2026 07:28
@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

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 13b8b567-4104-4ee3-bfe1-3b9bdaf51a51

📥 Commits

Reviewing files that changed from the base of the PR and between 12ab7af and f740522.

📒 Files selected for processing (3)
  • config/default.nix
  • config/obsidian/default.nix
  • config/obsidian/obsidian.json

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Added Obsidian configuration support with CLI mode enabled.
    • Reordered module initialization sequence.

Walkthrough

Reorders module inclusions in the main config and adds a new Obsidian module with conditional initialization based on the host configuration. The module provides XDG configuration file management for Obsidian settings with CLI mode enabled.

Changes

Cohort / File(s) Summary
Module Reordering
config/default.nix
Reordered module inclusions: swapped positions of ./obsidian and ./openclaw, moved ./paperclip to later position in the module list.
Obsidian Configuration
config/obsidian/default.nix, config/obsidian/obsidian.json
Added new Nix module defining XDG config file entry for obsidian/obsidian.json with conditional enablement based on inputs.host.isKyber. Configuration file enables CLI mode.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Behold, the rabbit hops with glee,
New modules shuffled, fresh and free!
Obsidian configured, CLI bright,
Order restored—all feels just right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding Obsidian CLI configuration for the headless kyber host.
Description check ✅ Passed The description is directly related to the changeset, providing context, implementation details, and a test plan for the Obsidian CLI configuration addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/obsidian-cli-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.

@mesa-dot-dev

mesa-dot-dev Bot commented Apr 12, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Added Obsidian CLI configuration for headless Kyber hosts by creating config/obsidian/obsidian.json with {"cli": true}.

What changed?

  • Added config/obsidian/obsidian.json with {"cli": true} to enable Obsidian CLI
  • Configured deployment via xdg.configFile exclusively on Kyber
  • Fixed alphabetical ordering in config/default.nix

Description generated by Mesa. Update settings

@shunkakinoki
shunkakinoki merged commit 26c31d1 into main Apr 12, 2026
34 of 35 checks passed
@shunkakinoki
shunkakinoki deleted the feat/obsidian-cli-config branch April 12, 2026 07:29

@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 introduces Obsidian configuration by adding a new module and an obsidian.json file, while also alphabetizing the imports in the main configuration. A review comment highlights that managing the configuration file via xdg.configFile results in a read-only symlink, which may prevent Obsidian from saving state or updating settings, and suggests using builtins.toJSON for a cleaner implementation if the file is intended to be read-only.

Comment on lines +10 to +11
source = ./obsidian.json;
enable = isKyber;

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

Managing obsidian.json via xdg.configFile creates a read-only symlink in the Nix store. Since Obsidian writes to this file to track vaults and other settings, this will prevent the application from saving state (like newly opened vaults) and may cause errors during CLI operations that attempt to update the configuration. If you only need to ensure the CLI is enabled and are okay with the file being read-only, you can simplify the implementation by using text with builtins.toJSON instead of a separate file (and then delete obsidian.json). Otherwise, consider using a home.activation script to modify the file in-place if you need it to remain writable.

    text = builtins.toJSON { cli = true; };
    enable = isKyber;

Copilot AI 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.

Pull request overview

Adds a declarative Obsidian CLI enablement config for the headless “kyber” host, and wires it into the existing config/ module import list.

Changes:

  • Add config/obsidian/obsidian.json with "cli": true for Obsidian 1.12+ CLI enablement.
  • Add config/obsidian/default.nix to deploy that config via xdg.configFile gated by inputs.host.isKyber.
  • Update config/default.nix to include the new ./obsidian module and restore alphabetical ordering around that area.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
config/obsidian/obsidian.json Introduces the Obsidian CLI enablement JSON config.
config/obsidian/default.nix Deploys the JSON config to ~/.config/obsidian/obsidian.json only on kyber.
config/default.nix Imports the new obsidian config module and reorders entries alphabetically.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants