GithubHelp home page GithubHelp logo

austinbutler / nixpkgs-neorg-overlay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nvim-neorg/nixpkgs-neorg-overlay

0.0 1.0 0.0 564 KB

Nixpkgs overlay for Neorg and related packages

License: MIT License

Nix 100.00%

nixpkgs-neorg-overlay's Introduction

Neorg overlay for Nixpkgs

This is a Nixpkgs overlay that gives Nix users access to unstable versions of Neorg and its associated projects.

Nixpkgs already packages Neorg and the NFF Tree-sitter parser, however those are updated very rarely. This is a problem for rapidly growing projects such as Neorg and can cause the plugin and parser to go out-of-sync. This overlay is updated automatically every 2 hours and, apart from the base plugin and TS parser, provides additional Neorg-related packages.

Installation

For documentation on how overlays work and how to use them, refer to the Nixpkgs Manual.

Please note that as of right now only flake-based systems are supported, an example of which you can see below.

Example

The following minimal NixOS flake configures Neovim with Neorg and Tree-sitter support using Home Manager:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    home-manager.url = "github:nix-community/home-manager";
    neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
  };
  outputs = { self, nixpkgs, home-manager, neorg, ... }: {
    nixosConfigurations.machine = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        home-manager.nixosModules.home-manager
        {
          nixpkgs.overlays = [ neorg-overlay.overlays.default ];
          home-manager.users.bandithedoge = {
            programs.neovim = {
              enable = true;
              plugins = with pkgs.vimPlugins; [
                neorg

                # optional
                neorg-telescope

                # optional — only if you want additional grammars besides norg and
                # norg_meta, otherwise auto-required.
                #
                # N.b.: Don't use plain nvim-treesitter as it would result in no
                # grammars getting installed, always the withPlugins function.
                # The minimal form is nvim-treesitter.withPlugins (_: [ ]) — the norg
                # grammars are added automatically.
                #
                # For all available grammars, nvim-treesitter.withAllGrammars or the
                # equivalent nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars)
                # can be used.
                (nvim-treesitter.withPlugins (p: with p; [
                  # Keep calm and don't :TSInstall
                  tree-sitter-lua
                ]))
              ];
              extraConfig = ''
                lua << EOF
                  require("nvim-treesitter.configs").setup {
                    highlight = {
                      enable = true,
                    }
                  }

                  require("neorg").setup {
                    load = {
                      ["core.defaults"] = {}
                    }
                  }
                EOF
              '';
            };
          };
        }
      ];
    };
  };
}

Package list

nixpkgs-neorg-overlay's People

Contributors

github-actions[bot] avatar bandithedoge avatar pschyska avatar daschw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.