diff --git a/config/plug/utils/obsidian.nix b/config/plug/utils/obsidian.nix index 47c7140..019b7b8 100644 --- a/config/plug/utils/obsidian.nix +++ b/config/plug/utils/obsidian.nix @@ -1,7 +1,6 @@ -{ lib, ... }: { plugins.obsidian = { - enable = lib.mkDefault false; + enable = true; settings = { completion = { min_chars = 2; @@ -10,18 +9,10 @@ new_notes_location = "current_dir"; workspaces = [ { - name = "work"; - path = "~/obsidian/work"; - } - { - name = "home"; - path = "~/obsidian/home"; + name = "default"; + path = "~/Documents"; } ]; - daily_notes = { - template = "~/obsidian/templates/daily_note_template.md"; - folder = "~/obsidian/work/daily_notes"; - }; mappings = { gf = { action = "require('obsidian').util.gf_passthrough"; @@ -36,86 +27,6 @@ opts.buffer = true; }; }; - templates = { - subdir = "~/obsidian/templates"; - substitutions = { - monday.__raw = '' - function() - -- Get the current date - local currentDate = os.date("*t") - - -- Calculate the difference in days to the first day of the week (Monday) - local diff = (currentDate.wday + 5) % 7 - - -- Subtract the difference to get the date of the first day of the week - currentDate.day = currentDate.day - diff - - -- Return the date of the first day of the week - return os.date("%Y-%m-%d", os.time(currentDate)) - end - ''; - tuesday.__raw = '' - function() - -- Get the current date - local currentDate = os.date("*t") - - -- Calculate the difference in days to the first day of the week (Monday) - local diff = (currentDate.wday + 4) % 7 - - -- Subtract the difference to get the date of the first day of the week - currentDate.day = currentDate.day - diff - - -- Return the date of the first day of the week - return os.date("%Y-%m-%d", os.time(currentDate)) - end - ''; - wednesday.__raw = '' - function() - -- Get the current date - local currentDate = os.date("*t") - - -- Calculate the difference in days to the first day of the week (Monday) - local diff = (currentDate.wday + 3) % 7 - - -- Subtract the difference to get the date of the first day of the week - currentDate.day = currentDate.day - diff - - -- Return the date of the first day of the week - return os.date("%Y-%m-%d", os.time(currentDate)) - end - ''; - thursday.__raw = '' - function() - -- Get the current date - local currentDate = os.date("*t") - - -- Calculate the difference in days to the first day of the week (Monday) - local diff = (currentDate.wday + 2) % 7 - - -- Subtract the difference to get the date of the first day of the week - currentDate.day = currentDate.day - diff - - -- Return the date of the first day of the week - return os.date("%Y-%m-%d", os.time(currentDate)) - end - ''; - friday.__raw = '' - function() - -- Get the current date - local currentDate = os.date("*t") - - -- Calculate the difference in days to the first day of the week (Monday) - local diff = (currentDate.wday + 1) % 7 - - -- Subtract the difference to get the date of the first day of the week - currentDate.day = currentDate.day - diff - - -- Return the date of the first day of the week - return os.date("%Y-%m-%d", os.time(currentDate)) - end - ''; - }; - }; }; }; }