desktop.obsidian: init

This commit is contained in:
2026-07-14 18:27:00 +08:00
parent 18278d7175
commit 4b00391922
4 changed files with 45 additions and 0 deletions
@@ -34,6 +34,8 @@ opt.completeopt = ""
opt.exrc = true
opt.conceallevel = 2
opt.autoread = true
vim.g.autoread = true
@@ -335,6 +335,25 @@ local plugins = {
},
name = "registers",
},
{
"epwalsh/obsidian.nvim",
version = "*",
enabled = false,
lazy = true,
ft = "markdown",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
workspaces = {
{
name = "dynamic",
path = function()
return assert(vim.fs.dirname(vim.api.nvim_buf_get_name(0)))
end,
},
},
},
},
}
require("lazy").setup(plugins, {})
+1
View File
@@ -17,6 +17,7 @@ in
wm.all.enable = true;
style.enable = true;
wine.enable = true;
obsidian.enable = true;
};
};
}
+23
View File
@@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.my.desktop.obsidian;
in
{
options.my.desktop.obsidian = {
enable = lib.mkEnableOption "obsidian";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = with pkgs; [
obsidian
];
my.persist.homeDirs = [
".config/obsidian"
];
};
}