commit c0e15868ee21150ac8d127d5bc0eeeb82598f74a Author: janabhumi Date: Thu Sep 15 01:22:06 2022 +0300 initial commit diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b42106 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv/ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..16c4428 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1663146586, + "narHash": "sha256-VCGdyEc5TF0uq+gdU+jesjZcNxptomDunvGtElmAD9I=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "125efbd96af28ea5d60e00a3eed832ea3f49a93b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d14b651 --- /dev/null +++ b/flake.nix @@ -0,0 +1,56 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, utils }: + utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + + neovim = pkgs.wrapNeovim pkgs.neovim-unwrapped + { + withPython3 = false; + withNodeJs = false; + withRuby = false; + + configure = { + customRC = '' + lua << EOF + require("nvim-treesitter.configs").setup({ + -- A list of parser names, or "all" + ensure_installed = {}, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + highlight = { + enable = true, + }, + + indent = { + enable = true, + }, + }) + EOF + ''; + + packages.myVimPackages = + { + start = with pkgs.vimPlugins; [ + (nvim-treesitter.withPlugins + (ts: [ + ts.tree-sitter-nix + ])) + ]; + }; + }; + }; + in + { + devShells.default = pkgs.mkShell { + packages = [ neovim ]; + }; + }); +}