{ config, lib, pkgs, inputs, ... }: let inherit (lib) mkEnableOption mkIf readFile; in { home-manager.users.moritz.programs.nixvim = { plugins.obsidian = { enable = true; settings = { ui.enable = false; dir = "~/Documents/Nextcloud/Notes/zettelkasten/"; note_id_func.__raw = '' function(title) if title ~= nil then return title else suffix = "" for _ = 1, 4 do suffix = suffix .. string.char(math.random(65, 90)) end return tostring(os.date("%Y-%m-%d")) .. "-" .. suffix end end ''; }; }; }; }