Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions config/obsidian/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
{
config,
inputs,
pkgs,
...
}:
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.

obsidianJson = pkgs.writeText "obsidian.json" (builtins.toJSON {
cli = true;
vaults.wiki = {
path = "${config.home.homeDirectory}/ghq/github.com/shunkakinoki/wiki";
ts = 0;
open = true;
};
});
in
{
xdg.configFile."obsidian/obsidian.json" = {
source = ./obsidian.json;
enable = isKyber;
source = obsidianJson;
enable = enabled;
};
Comment on lines 20 to 23

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

}
2 changes: 1 addition & 1 deletion dotagents
Submodule dotagents updated 1 files
+35 −20 Makefile
Loading