diff --git a/modules/notes/obsidian/config.nix b/modules/notes/obsidian/config.nix index 1107c35..8f9c2d1 100644 --- a/modules/notes/obsidian/config.nix +++ b/modules/notes/obsidian/config.nix @@ -23,6 +23,18 @@ in { if (auto.type == "nvim-cmp") then "true" else "false" + } + }, + daily_notes = { + folder = ${ + if (cfg.daily-notes.folder == "") + then "nil," + else "'${cfg.daily-notes.folder}'," + } + date_format = ${ + if (cfg.daily-notes.date-format == "") + then "nil," + else "'${cfg.daily-notes.date-format}'," } } }) diff --git a/modules/notes/obsidian/obsidian.nix b/modules/notes/obsidian/obsidian.nix index 674c66b..60ee71f 100644 --- a/modules/notes/obsidian/obsidian.nix +++ b/modules/notes/obsidian/obsidian.nix @@ -14,6 +14,19 @@ with builtins; { description = "Obsidian vault directory"; }; + daily-notes = { + folder = mkOption { + type = types.str; + default = ""; + description = "Directory in which daily notes should be created"; + }; + date-format = mkOption { + type = types.str; + default = ""; + description = "Date format used for creating daily notes"; + }; + }; + completion = { nvim_cmp = mkOption { # if using nvim-cmp, otherwise set to false