diff --git a/flake.nix b/flake.nix index ce9573a..bebefa3 100644 --- a/flake.nix +++ b/flake.nix @@ -212,6 +212,7 @@ "vcv-rack" "SunVox" "renoise" + "obsidian" ]; }; overlays = [ @@ -421,6 +422,7 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { inherit inputs; }; + backupFileExtension = "hm-bak"; }; } ]; diff --git a/home/darwin/default.nix b/home/darwin/default.nix index 50c6853..2da83c6 100644 --- a/home/darwin/default.nix +++ b/home/darwin/default.nix @@ -14,6 +14,7 @@ ../profiles/kitty ../profiles/tmux ../profiles/opencode + ../profiles/obsidian # ../profiles/firefox ]; diff --git a/home/profiles/obsidian/.obsidian.vimrc b/home/profiles/obsidian/.obsidian.vimrc new file mode 100644 index 0000000..51d5679 --- /dev/null +++ b/home/profiles/obsidian/.obsidian.vimrc @@ -0,0 +1,73 @@ +" ============================================================ +" Obsidian Vimrc (requires Vimrc Support plugin by esm7) +" ============================================================ + +" --- Clipboard --- +" All yanks go to system clipboard +set clipboard=unnamedplus + +" Make Y yank to end of line (consistent with C and D) +nnoremap Y y$ + +" --- Unbind Space for use as leader --- +unmap + +" --- Sidebar & Navigation --- +" Toggle left sidebar +exmap toggleSidebar obcommand app:toggle-left-sidebar +nmap e :toggleSidebar + +" Reveal active file in file explorer +exmap revealFile obcommand file-explorer:reveal-active-file +nmap f :revealFile + +" Command palette +exmap commandPalette obcommand command-palette:open +nmap p :commandPalette + +" --- Tab Navigation --- +" Next tab (matches Vim gt) +exmap nextTab obcommand workspace:next-tab +nmap gt :nextTab + +" Previous tab (matches Vim gT) +exmap prevTab obcommand workspace:previous-tab +nmap gT :prevTab + +" Close current tab +exmap closeTab obcommand workspace:close +nmap gd :closeTab + +" --- Notes --- +" Daily note (Periodic Notes) +exmap dailyNote obcommand periodic-notes:open-daily-note +nmap d :dailyNote + +" Weekly note (Periodic Notes) +exmap weeklyNote obcommand periodic-notes:open-weekly-note +nmap w :weeklyNote + +" New Zettelkasten note +exmap newZK obcommand zk-prefixer +nmap zn :newZK + +" Split (QuickAdd macro) +exmap splitNote obcommand quickadd:choice:1d350c80-9184-4f8a-b37e-4e7c0712a19f +nmap zs :splitNote + +" --- Folding --- +exmap unfoldAtCursor obcommand editor:unfold +exmap foldAtCursor obcommand editor:fold +exmap toggleFold obcommand editor:toggle-fold +exmap unfoldAll obcommand editor:unfold-all +exmap foldAll obcommand editor:fold-all + +nmap zo :unfoldAtCursor +nmap zc :foldAtCursor +nmap za :toggleFold +nmap zR :unfoldAll +nmap zM :foldAll + +" --- Quick Switcher --- +exmap quickSwitcher obcommand switcher:open +nmap :quickSwitcher diff --git a/home/profiles/obsidian/default.nix b/home/profiles/obsidian/default.nix new file mode 100644 index 0000000..413dc23 --- /dev/null +++ b/home/profiles/obsidian/default.nix @@ -0,0 +1,568 @@ +{ + pkgs, + lib, + ... +}: + +let + isDarwin = pkgs.stdenv.isDarwin; + plugins = pkgs.obsidianPlugins; +in +{ + programs.obsidian = { + enable = true; + + defaultSettings = { + app = { + vimMode = true; + promptDelete = false; + }; + + appearance = { }; + + corePlugins = [ + # Shared across all vaults (union of kitaab + sourcegraph) + "file-explorer" + "global-search" + "switcher" + "graph" + "backlink" + "canvas" + "outgoing-link" + "tag-pane" + "page-preview" + "templates" + "note-composer" + "command-palette" + "editor-status" + "bookmarks" + "outline" + "word-count" + "file-recovery" + # From kitaab + "properties" + "daily-notes" + "sync" + # From sourcegraph + "zk-prefixer" + # NOTE: "bases" and "webviewer" are not yet in the home-manager + # core plugins enum. They will need to be enabled manually in + # Obsidian or added here once home-manager updates. + # Core plugins with settings + { + name = "daily-notes"; + settings = { + format = "YYYYMMDD"; + template = "zk-template"; + }; + } + { + name = "graph"; + settings = { + collapse-filter = true; + search = ""; + showTags = false; + showAttachments = false; + hideUnresolved = false; + showOrphans = true; + collapse-color-groups = true; + colorGroups = [ ]; + collapse-display = true; + showArrow = false; + textFadeMultiplier = 0; + nodeSizeMultiplier = 1; + lineSizeMultiplier = 1; + collapse-forces = true; + centerStrength = 0.518713248970312; + repelStrength = 10; + linkStrength = 1; + linkDistance = 250; + scale = 1; + close = false; + }; + } + { + name = "zk-prefixer"; + settings = { + format = "YYMMDD-HHmm"; + template = "zk-template"; + }; + } + ]; + + communityPlugins = [ + { + pkg = plugins.obsidian-linter; + settings = { + ruleConfigs = { + add-blank-line-after-yaml.enabled = false; + dedupe-yaml-array-values = { + enabled = false; + dedupe-alias-key = true; + dedupe-tag-key = true; + dedupe-array-keys = true; + ignore-keys = ""; + }; + escape-yaml-special-characters = { + enabled = false; + try-to-escape-single-line-arrays = false; + }; + force-yaml-escape = { + enabled = false; + force-yaml-escape-keys = ""; + }; + format-tags-in-yaml.enabled = false; + format-yaml-array = { + enabled = false; + alias-key = true; + tag-key = true; + default-array-style = "single-line"; + default-array-keys = true; + force-single-line-array-style = ""; + force-multi-line-array-style = ""; + }; + insert-yaml-attributes = { + enabled = false; + text-to-insert = ""; + }; + move-tags-to-yaml = { + enabled = false; + how-to-handle-existing-tags = "Nothing"; + tags-to-ignore = ""; + }; + remove-yaml-keys = { + enabled = false; + yaml-keys-to-remove = ""; + }; + sort-yaml-array-values = { + enabled = false; + sort-alias-key = true; + sort-tag-key = true; + sort-array-keys = true; + ignore-keys = ""; + sort-order = "Ascending Alphabetical"; + }; + yaml-key-sort = { + enabled = false; + yaml-key-priority-sort-order = ""; + priority-keys-at-start-of-yaml = true; + yaml-sort-order-for-other-keys = "None"; + }; + yaml-timestamp = { + enabled = true; + date-created = false; + date-created-key = "date"; + date-created-source-of-truth = "file system"; + date-modified = true; + date-modified-key = "update"; + date-modified-source-of-truth = "file system"; + format = "YYMMDD-HHmm"; + convert-to-utc = false; + update-on-file-contents-updated = "never"; + }; + yaml-title = { + enabled = false; + title-key = "title"; + mode = "first-h1-or-filename-if-h1-missing"; + }; + yaml-title-alias = { + enabled = false; + preserve-existing-alias-section-style = true; + keep-alias-that-matches-the-filename = false; + use-yaml-key-to-keep-track-of-old-filename-or-heading = true; + alias-helper-key = "linter-yaml-title-alias"; + }; + capitalize-headings = { + enabled = false; + style = "Title Case"; + ignore-case-words = true; + ignore-words = "macOS, iOS, iPhone, iPad, JavaScript, TypeScript, AppleScript, I"; + lowercase-words = ""; + }; + file-name-heading.enabled = false; + header-increment = { + enabled = false; + start-at-h2 = false; + }; + headings-start-line.enabled = false; + remove-trailing-punctuation-in-heading = { + enabled = false; + punctuation-to-remove = ".,;:!"; + }; + footnote-after-punctuation.enabled = false; + move-footnotes-to-the-bottom = { + enabled = false; + include-blank-line-between-footnotes = false; + }; + re-index-footnotes.enabled = false; + auto-correct-common-misspellings = { + enabled = false; + ignore-words = ""; + skip-words-with-multiple-capitals = false; + extra-auto-correct-files = [ ]; + }; + blockquote-style = { + enabled = false; + style = "space"; + }; + convert-bullet-list-markers.enabled = false; + default-language-for-code-fences = { + enabled = false; + default-language = ""; + }; + emphasis-style = { + enabled = false; + style = "consistent"; + }; + no-bare-urls = { + enabled = false; + no-bare-uris = false; + }; + ordered-list-style = { + enabled = false; + number-style = "ascending"; + list-end-style = "."; + }; + proper-ellipsis.enabled = false; + quote-style = { + enabled = false; + single-quote-enabled = true; + single-quote-style = "''"; + double-quote-enabled = true; + double-quote-style = "\"\""; + }; + remove-consecutive-list-markers.enabled = false; + remove-empty-list-markers.enabled = false; + remove-hyphenated-line-breaks.enabled = false; + remove-multiple-spaces.enabled = false; + strong-style = { + enabled = false; + style = "consistent"; + }; + two-spaces-between-lines-with-content = { + enabled = false; + line-break-indicator = " "; + }; + unordered-list-style = { + enabled = false; + list-style = "consistent"; + }; + compact-yaml = { + enabled = false; + inner-new-lines = false; + }; + consecutive-blank-lines.enabled = false; + convert-spaces-to-tabs = { + enabled = false; + tabsize = 4; + }; + empty-line-around-blockquotes.enabled = false; + empty-line-around-code-fences.enabled = false; + empty-line-around-horizontal-rules.enabled = false; + empty-line-around-math-blocks.enabled = false; + empty-line-around-tables.enabled = false; + heading-blank-lines = { + enabled = false; + bottom = true; + empty-line-after-yaml = true; + }; + line-break-at-document-end.enabled = false; + move-math-block-indicators-to-their-own-line.enabled = false; + paragraph-blank-lines.enabled = false; + remove-empty-lines-between-list-markers-and-checklists.enabled = false; + remove-link-spacing.enabled = false; + remove-space-around-characters = { + enabled = false; + include-fullwidth-forms = true; + include-cjk-symbols-and-punctuation = true; + include-dashes = true; + other-symbols = ""; + }; + remove-space-before-or-after-characters = { + enabled = false; + characters-to-remove-space-before = ",!?;:).'\"]\"}"; + characters-to-remove-space-after = "¿¡'\"([\""; + }; + space-after-list-markers.enabled = false; + space-between-chinese-japanese-or-korean-and-english-or-numbers = { + enabled = false; + english-symbols-punctuation-before = "-+;:'\"°%$)]"; + english-symbols-punctuation-after = "-+'\"([¥$"; + }; + trailing-spaces = { + enabled = false; + two-space-line-break = false; + }; + add-blockquote-indentation-on-paste.enabled = false; + prevent-double-checklist-indicator-on-paste.enabled = false; + prevent-double-list-item-indicator-on-paste.enabled = false; + proper-ellipsis-on-paste.enabled = false; + remove-hyphens-on-paste.enabled = false; + remove-leading-or-trailing-whitespace-on-paste.enabled = false; + remove-leftover-footnotes-from-quote-on-paste.enabled = false; + remove-multiple-blank-lines-on-paste.enabled = false; + }; + lintOnSave = true; + recordLintOnSaveLogs = false; + displayChanged = true; + suppressMessageWhenNoChange = false; + lintOnFileChange = false; + displayLintOnFileChangeNotice = false; + settingsConvertedToConfigKeyValues = true; + foldersToIgnore = [ ]; + filesToIgnore = [ ]; + linterLocale = "system-default"; + logLevel = "ERROR"; + lintCommands = [ ]; + customRegexes = [ ]; + commonStyles = { + aliasArrayStyle = "single-line"; + tagArrayStyle = "single-line"; + minimumNumberOfDollarSignsToBeAMathBlock = 2; + escapeCharacter = "\""; + removeUnnecessaryEscapeCharsForMultiLineArrays = false; + }; + }; + } + { + pkg = plugins.quickadd; + settings = { + choices = [ + { + id = "1d350c80-9184-4f8a-b37e-4e7c0712a19f"; + name = "split"; + type = "Macro"; + command = true; + runOnStartup = false; + macro = { + name = "split"; + id = "707f5ace-fc9a-4999-b880-d3dea752ade3"; + commands = [ + { + name = "split"; + type = "UserScript"; + id = "b9295f2c-177f-497c-aced-793bba9aca50"; + path = "scripts/split.js"; + settings = { }; + } + ]; + }; + } + ]; + inputPrompt = "single-line"; + persistInputPromptDrafts = true; + useSelectionAsCaptureValue = true; + devMode = false; + templateFolderPath = ""; + announceUpdates = "major"; + version = "2.11.0"; + globalVariables = { }; + onePageInputEnabled = false; + disableOnlineFeatures = true; + enableRibbonIcon = false; + showCaptureNotification = true; + showInputCancellationNotification = false; + enableTemplatePropertyTypes = false; + dateAliases = { + t = "today"; + tm = "tomorrow"; + yd = "yesterday"; + nw = "next week"; + nm = "next month"; + ny = "next year"; + lw = "last week"; + lm = "last month"; + ly = "last year"; + }; + ai = { + defaultModel = "Ask me"; + # NOTE: The LaTeX in this prompt has extra backslashes vs the original + # due to Nix string escaping (\t = tab in "..." strings). The original + # prompt was already broken (missing backslashes on \eta, \cdot, etc.) + # so this is a known cosmetic difference. + defaultSystemPrompt = "As an AI assistant within Obsidian, your primary goal is to help users manage their ideas and knowledge more effectively. Format your responses using Markdown syntax. Please use the [[Obsidian]] link format. You can write aliases for the links by writing [[Obsidian|the alias after the pipe symbol]]. To use mathematical notation, use LaTeX syntax. LaTeX syntax for larger equations should be on separate lines, surrounded with double dollar signs ($$). You can also inline math expressions by wrapping it in $ symbols. For example, use $$w_{ij}^{\\text{new}}:=w_{ij}^{\\text{current}}+etacdotdelta_jcdot x_{ij}$$ on a separate line, but you can write \"($eta$ = learning rate, $delta_j$ = error term, $x_{ij}$ = input)\" inline."; + promptTemplatesFolderPath = ""; + showAssistant = true; + providers = [ + { + name = "OpenAI"; + endpoint = "https://api.openai.com/v1"; + apiKey = ""; + models = [ + { + name = "gpt-3.5-turbo"; + maxTokens = 4096; + } + { + name = "gpt-3.5-turbo-16k"; + maxTokens = 16384; + } + { + name = "gpt-3.5-turbo-1106"; + maxTokens = 16385; + } + { + name = "gpt-4"; + maxTokens = 8192; + } + { + name = "gpt-4-32k"; + maxTokens = 32768; + } + { + name = "gpt-4-1106-preview"; + maxTokens = 128000; + } + { + name = "gpt-4-turbo"; + maxTokens = 128000; + } + { + name = "gpt-4o"; + maxTokens = 128000; + } + { + name = "gpt-4o-mini"; + maxTokens = 128000; + } + ]; + autoSyncModels = false; + modelSource = "modelsDev"; + } + { + name = "Gemini"; + endpoint = "https://generativelanguage.googleapis.com"; + apiKey = ""; + models = [ + { + name = "gemini-1.5-pro"; + maxTokens = 1000000; + } + { + name = "gemini-1.5-flash"; + maxTokens = 1000000; + } + { + name = "gemini-1.5-flash-8b"; + maxTokens = 1000000; + } + ]; + autoSyncModels = false; + modelSource = "modelsDev"; + } + ]; + }; + migrations = { + migrateToMacroIDFromEmbeddedMacro = true; + useQuickAddTemplateFolder = true; + incrementFileNameSettingMoveToDefaultBehavior = true; + mutualExclusionInsertAfterAndWriteToBottomOfFile = true; + setVersionAfterUpdateModalRelease = true; + addDefaultAIProviders = true; + removeMacroIndirection = true; + migrateFileOpeningSettings = true; + backfillFileOpeningDefaults = true; + setProviderModelDiscoveryMode = true; + migrateProviderApiKeysToSecretStorage = true; + }; + }; + } + { + pkg = plugins.recent-files-obsidian; + settings = { + omittedPaths = [ ]; + omittedTags = [ ]; + updateOn = "file-open"; + omitBookmarks = false; + }; + } + { + pkg = plugins.periodic-notes; + settings = { + showGettingStartedBanner = false; + hasMigratedDailyNoteSettings = true; + hasMigratedWeeklyNoteSettings = false; + daily = { + format = "YYYYMMDD"; + folder = "My Day"; + template = "zk-template"; + enabled = true; + }; + weekly = { + format = "YYMM-[W]ww"; + template = "zk-template.md"; + folder = "My Day"; + enabled = true; + }; + monthly = { + format = ""; + template = ""; + folder = ""; + }; + quarterly = { + format = ""; + template = ""; + folder = ""; + }; + yearly = { + format = ""; + template = ""; + folder = ""; + }; + }; + } + plugins.obsidian-vimrc-support + plugins.obsidian-atmosphere + ]; + + themes = [ + { + pkg = plugins.ayu-mirage; + enable = false; # installed but not active (cssTheme = "") + } + ]; + + hotkeys = { + "quickadd:choice:1d350c80-9184-4f8a-b37e-4e7c0712a19f" = [ + { + modifiers = [ "Ctrl" ]; + key = "S"; + } + ]; + "periodic-notes:open-daily-note" = [ + { + modifiers = [ "Ctrl" ]; + key = "D"; + } + ]; + "zk-prefixer" = [ + { + modifiers = [ "Ctrl" ]; + key = "N"; + } + { + modifiers = [ "Mod" ]; + key = "N"; + } + ]; + "file-explorer:new-file" = [ ]; + }; + }; + + vaults = { + "kitaab/markdown" = { }; + } + // lib.optionalAttrs isDarwin { + "usr/acreom/sourcegraph" = { }; + }; + }; + + # .obsidian.vimrc lives in the vault root, not inside .obsidian/ + # Using home.file with source for symlink-based management + home.file = { + "kitaab/markdown/.obsidian.vimrc".source = ./.obsidian.vimrc; + } + // lib.optionalAttrs isDarwin { + "usr/acreom/sourcegraph/.obsidian.vimrc".source = ./.obsidian.vimrc; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index edcda7f..33f7d7b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,7 +1,10 @@ # Custom packages, that can be defined similarly to ones from nixpkgs # You can build them using 'nix build .#example' or (legacy) 'nix-build -A example' -{ pkgs ? (import ../nixpkgs.nix) { } }: { +{ + pkgs ? (import ../nixpkgs.nix) { }, +}: +{ plymouth-themes = pkgs.callPackage ./plymouth.nix { }; tic-80 = pkgs.callPackage ./tic-80.nix { }; fennel-ls = pkgs.callPackage ./fennel-ls.nix { }; @@ -11,6 +14,7 @@ # Wallabag is now an overlay # TODO: we still use the patch from this folder though my-wallabag = pkgs.callPackage ./wallabag.nix { }; - # mautrix-slack = pkgs.callPackage ./mautrix-slack.nix { }; - gpodder2go = pkgs.callPackage ./gpodder2go.nix { }; + # mautrix-slack = pkgs.callPackage ./mautrix-slack.nix { }; + gpodder2go = pkgs.callPackage ./gpodder2go.nix { }; + obsidianPlugins = pkgs.callPackage ./obsidian-plugins { }; } diff --git a/pkgs/obsidian-plugins/default.nix b/pkgs/obsidian-plugins/default.nix new file mode 100644 index 0000000..2ae23d3 --- /dev/null +++ b/pkgs/obsidian-plugins/default.nix @@ -0,0 +1,207 @@ +{ + lib, + stdenvNoCC, + fetchurl, + writeText, +}: + +let + # Helper to build an Obsidian plugin from pre-built GitHub release assets. + # The home-manager module expects a package with manifest.json at the root. + buildObsidianPlugin = + { + pname, + version, + owner, + repo, + mainJs, + manifestJson, + stylesCSS ? null, + meta ? { }, + }: + stdenvNoCC.mkDerivation { + inherit pname version; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out + cp ${mainJs} $out/main.js + cp ${manifestJson} $out/manifest.json + '' + + lib.optionalString (stylesCSS != null) '' + cp ${stylesCSS} $out/styles.css + ''; + + meta = { + platforms = lib.platforms.all; + } + // meta; + }; + + # Helper to build an Obsidian theme. + # Themes need manifest.json and theme.css at the root. + buildObsidianTheme = + { + pname, + version, + themeCSS, + manifestJson, + meta ? { }, + }: + stdenvNoCC.mkDerivation { + inherit pname version; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out + cp ${manifestJson} $out/manifest.json + cp ${themeCSS} $out/theme.css + ''; + + meta = { + platforms = lib.platforms.all; + } + // meta; + }; +in +{ + obsidian-linter = buildObsidianPlugin { + pname = "obsidian-linter"; + version = "1.31.0"; + owner = "platers"; + repo = "obsidian-linter"; + mainJs = fetchurl { + url = "https://github.com/platers/obsidian-linter/releases/download/1.31.0/main.js"; + sha256 = "19k38qlm4g6jw4baqidyjs64aw3vlm01v9gz1f1dpn828csz8xiv"; + }; + manifestJson = fetchurl { + url = "https://github.com/platers/obsidian-linter/releases/download/1.31.0/manifest.json"; + sha256 = "0isjnpmsv6a0i1bj7rndwaafg5wp3ch7dxlvq49mbfw424dz76hm"; + }; + stylesCSS = fetchurl { + url = "https://github.com/platers/obsidian-linter/releases/download/1.31.0/styles.css"; + sha256 = "1nr27i0lvmxdzvgkzm8qwbcb4h4zmvyarc9kqk3msi590n5m1kqc"; + }; + meta.description = "Formats and styles your notes with configurable linting rules"; + }; + + quickadd = buildObsidianPlugin { + pname = "quickadd"; + version = "2.11.0"; + owner = "chhoumann"; + repo = "quickadd"; + mainJs = fetchurl { + url = "https://github.com/chhoumann/quickadd/releases/download/2.11.0/main.js"; + sha256 = "0my0zmk0yx1gls35rgn614m8zfbks962kd701fvb95xdvlqmdjc2"; + }; + manifestJson = fetchurl { + url = "https://github.com/chhoumann/quickadd/releases/download/2.11.0/manifest.json"; + sha256 = "02ky8jj6z8anxmsgmnxcsmigg936ddhphbpf2ags3l3sr48ic5fw"; + }; + stylesCSS = fetchurl { + url = "https://github.com/chhoumann/quickadd/releases/download/2.11.0/styles.css"; + sha256 = "1vrkwak5k7w8819viw0qdc2yl4p2kgs73xaykac0k2885wqxd0vp"; + }; + meta.description = "Quickly add new pages or content to your vault"; + }; + + recent-files-obsidian = buildObsidianPlugin { + pname = "recent-files-obsidian"; + version = "1.7.6"; + owner = "tgrosinger"; + repo = "recent-files-obsidian"; + mainJs = fetchurl { + url = "https://github.com/tgrosinger/recent-files-obsidian/releases/download/1.7.6/main.js"; + sha256 = "0awn6r451apl1z46wdbr4s4npngd8cga2qyzyp36gfa7ykvsaajl"; + }; + manifestJson = fetchurl { + url = "https://github.com/tgrosinger/recent-files-obsidian/releases/download/1.7.6/manifest.json"; + sha256 = "02q69wd16gygqr3z7bdzkk4qpi13d8w80jqr7ji7gam3mhs3s6ki"; + }; + stylesCSS = fetchurl { + url = "https://github.com/tgrosinger/recent-files-obsidian/releases/download/1.7.6/styles.css"; + sha256 = "1nrxrcr0h2vrwxg0dj64f99yifvnlrxnyqh938i4if0bmf99rr1f"; + }; + meta.description = "List files by most recently opened"; + }; + + periodic-notes = buildObsidianPlugin { + pname = "periodic-notes"; + version = "0.0.17"; + owner = "liamcain"; + repo = "obsidian-periodic-notes"; + mainJs = fetchurl { + url = "https://github.com/liamcain/obsidian-periodic-notes/releases/download/0.0.17/main.js"; + sha256 = "03lb3ydw5p6xh7gm642x8bzfvr93knpw653nzhv10gb9ff3a3wfc"; + }; + manifestJson = fetchurl { + url = "https://github.com/liamcain/obsidian-periodic-notes/releases/download/0.0.17/manifest.json"; + sha256 = "17042hj7zrm7x4sldl0l95blpzlpbf13b4s8vb5kyfsxywir78mx"; + }; + stylesCSS = fetchurl { + url = "https://github.com/liamcain/obsidian-periodic-notes/releases/download/0.0.17/styles.css"; + sha256 = "0f322kmq8h08amq22wgvi5lcwfkvzdpa9n155vnh0jf8sj2kjgv1"; + }; + meta.description = "Create/manage your daily, weekly, and monthly notes"; + }; + + obsidian-vimrc-support = buildObsidianPlugin { + pname = "obsidian-vimrc-support"; + version = "0.10.2"; + owner = "esm7"; + repo = "obsidian-vimrc-support"; + mainJs = fetchurl { + url = "https://github.com/esm7/obsidian-vimrc-support/releases/download/0.10.2/main.js"; + sha256 = "1qkc9rrh92hy5cbm0vqy4zbgccn53f1cll220mg51wpf35776qv8"; + }; + manifestJson = fetchurl { + url = "https://github.com/esm7/obsidian-vimrc-support/releases/download/0.10.2/manifest.json"; + sha256 = "0mnh4yz53zx7lsyqpl4zjy3sb48l5mb83qw9jayqxf4iwd5mmpmj"; + }; + meta.description = "Auto-load a startup file with Obsidian Vim commands"; + }; + + obsidian-atmosphere = buildObsidianPlugin { + pname = "obsidian-atmosphere"; + version = "0.1.19"; + owner = "treethought"; + repo = "obsidian-atmosphere"; + mainJs = fetchurl { + url = "https://github.com/treethought/obsidian-atmosphere/releases/download/0.1.19/main.js"; + sha256 = "0ab2lzclbjzyprlar68qyx8cpbyfmxzpc4slrp0yp9f6yhz4pn91"; + }; + manifestJson = fetchurl { + url = "https://github.com/treethought/obsidian-atmosphere/releases/download/0.1.19/manifest.json"; + sha256 = "0qrfdz6xwl8jgbdkqsaxgk5jma1xna5xa1m3jcnlwmbsk6gnf7i8"; + }; + stylesCSS = fetchurl { + url = "https://github.com/treethought/obsidian-atmosphere/releases/download/0.1.19/styles.css"; + sha256 = "09022ykg2wipjkq8ysjkq4js5prhm8ll0kcsz1359xs45s06ajym"; + }; + meta.description = "Ambient weather and nature effects for Obsidian"; + }; + + # Ayu Mirage theme + # The upstream repo (bcdavasconcelos/Obsidian-Ayu_Mirage) uses the legacy + # format (obsidian.css). We fetch it and provide the manifest.json that + # Obsidian generated when installing it. + ayu-mirage = buildObsidianTheme { + pname = "ayu-mirage"; + version = "0.0.0"; + themeCSS = fetchurl { + url = "https://raw.githubusercontent.com/bcdavasconcelos/Obsidian-Ayu_Mirage/master/obsidian.css"; + sha256 = "0hcsgc8vlj0r2nwl1l4cvi9rr72m2aifyd3g538l0qrk5l6b1dqv"; + }; + manifestJson = writeText "manifest.json" ( + builtins.toJSON { + name = "Ayu Mirage"; + version = "0.0.0"; + minAppVersion = "0.16.0"; + author = "bernardo_v"; + } + ); + meta.description = "Ayu Mirage dark theme for Obsidian"; + }; +}