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
5 changes: 3 additions & 2 deletions config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ in
./k3s
./karabiner
./llm
./openclaw
./obsidian
./omp
./paperclip
./openclaw
./opencode
./paperclip
./pi
./serena
./starship
Expand Down
13 changes: 13 additions & 0 deletions config/obsidian/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
inputs,
...
}:
let
inherit (inputs.host) isKyber;
in
{
xdg.configFile."obsidian/obsidian.json" = {
source = ./obsidian.json;
enable = isKyber;
Comment on lines +10 to +11

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;

};
}
3 changes: 3 additions & 0 deletions config/obsidian/obsidian.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cli": true
}
Loading