From 53783fc910e9781c2dbac92b81e8b58cf4171d19 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 2 Feb 2024 10:53:35 +0800 Subject: [PATCH] nixvimConfigs/fiesta/setups/note-taking: init Though, in practice, this module may not be used and set it per-environment for its specificities. --- configs/nixvim/fiesta/default.nix | 1 - configs/nixvim/fiesta/modules/default.nix | 1 + .../fiesta/modules/setups/note-taking.nix | 35 +++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 configs/nixvim/fiesta/modules/setups/note-taking.nix diff --git a/configs/nixvim/fiesta/default.nix b/configs/nixvim/fiesta/default.nix index 9bb19458..2fbc83eb 100644 --- a/configs/nixvim/fiesta/default.nix +++ b/configs/nixvim/fiesta/default.nix @@ -12,7 +12,6 @@ fuzzy-finder.enable = true; debugging.enable = true; desktop-utils.enable = true; - note-taking.enable = true; }; # Some general settings. diff --git a/configs/nixvim/fiesta/modules/default.nix b/configs/nixvim/fiesta/modules/default.nix index 83e4b5d1..d1544e9c 100644 --- a/configs/nixvim/fiesta/modules/default.nix +++ b/configs/nixvim/fiesta/modules/default.nix @@ -4,6 +4,7 @@ ./setups/debugging.nix ./setups/desktop-utils.nix ./setups/fuzzy-finder.nix + ./setups/note-taking.nix ./setups/snippets ./setups/treesitter.nix ./setups/ui.nix diff --git a/configs/nixvim/fiesta/modules/setups/note-taking.nix b/configs/nixvim/fiesta/modules/setups/note-taking.nix new file mode 100644 index 00000000..1280596b --- /dev/null +++ b/configs/nixvim/fiesta/modules/setups/note-taking.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +let + nixvimCfg = config.nixvimConfigs.fiesta; + cfg = nixvimCfg.setups.note-taking; +in +{ + options.nixvimConfigs.fiesta.setups.note-taking.enable = + lib.mkEnableOption "basic note-taking setup"; + + config = lib.mkIf cfg.enable { + # The main star of the show. + plugins.neorg.enable = true; + + # Set it up, set it up. + plugins.neorg.extraOptions = { + lazy_loading = true; + + # The basic bare essentials. + load = { + "core.defaults" = { __empty = null; }; + "core.concealer" = { __empty = null; }; + }; + }; + + # Install the tree-sitter parsers. + plugins.treesitter.grammarPackages = + lib.mkIf + (config.plugins.neorg.extraOptions ? load."core.defaults") + (with pkgs.tree-sitter-grammars; [ + tree-sitter-norg + tree-sitter-norg-meta + ]); + }; +}