From 8506a5ecee657c2ee0279d1d254721cdbd25ec91 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 3 Oct 2023 22:08:02 +0300 Subject: [PATCH] flake: drop zig overlay --- flake.lock | 76 +++------------------------------------- flake.nix | 11 +++--- flake/legacyPackages.nix | 2 -- flake/overlays.nix | 4 +-- flake/packages.nix | 7 ++++ 5 files changed, 18 insertions(+), 82 deletions(-) diff --git a/flake.lock b/flake.lock index f939c12..2f2330a 100644 --- a/flake.lock +++ b/flake.lock @@ -402,22 +402,6 @@ "type": "github" } }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -454,21 +438,6 @@ "type": "github" } }, - "flake-utils_2": { - "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" - } - }, "flutter-tools": { "flake": false, "locked": { @@ -804,11 +773,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1690630721, - "narHash": "sha256-Y04onHyBQT4Erfr2fc82dbJTfXGYrf4V0ysLUYnPOP8=", + "lastModified": 1696261572, + "narHash": "sha256-s8TtSYJ1LBpuITXjbPLUPyxzAKw35LhETcajJjCS5f0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d2b52322f35597c62abf56de91b0236746b2a03d", + "rev": "0c7ffbc66e6d78c50c38e717ec91a2a14e0622fb", "type": "github" }, "original": { @@ -868,22 +837,6 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1689088367, - "narHash": "sha256-Y2tl2TlKCWEHrOeM9ivjCLlRAKH3qoPUE/emhZECU14=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5c9ddb86679c400d6b7360797b8a22167c2053f8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nmd": { "flake": false, "locked": { @@ -1514,8 +1467,7 @@ "vim-repeat": "vim-repeat", "vim-startify": "vim-startify", "vim-vsnip": "vim-vsnip", - "which-key": "which-key", - "zig": "zig" + "which-key": "which-key" } }, "rust-overlay": { @@ -1951,26 +1903,6 @@ "repo": "which-key.nvim", "type": "github" } - }, - "zig": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1690718829, - "narHash": "sha256-GN19SrCqWxIJN+rnbv+pIkF/yynh6FG2y7jY6PZRiYw=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "92e485cc7887f57be4d2921ed077f467912b7d33", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 48a280f..149078a 100644 --- a/flake.nix +++ b/flake.nix @@ -62,13 +62,8 @@ flake = false; }; - # TODO: get zig from the zig overlay instead of nixpkgs - zig.url = "github:mitchellh/zig-overlay"; - # LSP plugins nvim-lspconfig = { - # url = "github:neovim/nvim-lspconfig?ref=v0.1.3"; - # Use master for nil_ls url = "github:neovim/nvim-lspconfig"; flake = false; }; @@ -167,6 +162,7 @@ # Langauge server (use master instead of nixpkgs) rnix-lsp.url = "github:nix-community/rnix-lsp"; + nil = { url = "github:oxalica/nil"; inputs.nixpkgs.follows = "nixpkgs"; @@ -212,22 +208,27 @@ url = "github:hrsh7th/nvim-cmp"; flake = false; }; + cmp-buffer = { url = "github:hrsh7th/cmp-buffer"; flake = false; }; + cmp-nvim-lsp = { url = "github:hrsh7th/cmp-nvim-lsp"; flake = false; }; + cmp-vsnip = { url = "github:hrsh7th/cmp-vsnip"; flake = false; }; + cmp-path = { url = "github:hrsh7th/cmp-path"; flake = false; }; + cmp-treesitter = { url = "github:ray-x/cmp-treesitter"; flake = false; diff --git a/flake/legacyPackages.nix b/flake/legacyPackages.nix index c98d626..d6fb73c 100644 --- a/flake/legacyPackages.nix +++ b/flake/legacyPackages.nix @@ -9,11 +9,9 @@ overlays = [ inputs.tidalcycles.overlays.default inputs.self.overlays.default - inputs.zig.overlays.default (_: _: { rnix-lsp = inputs'.rnix-lsp.defaultPackage; nil = inputs'.nil.packages.default; - zig = inputs'.zig.packages.default; }) ]; }; diff --git a/flake/overlays.nix b/flake/overlays.nix index 7a0469c..c73f2c0 100644 --- a/flake/overlays.nix +++ b/flake/overlays.nix @@ -5,9 +5,7 @@ }: let inherit (import ../configuration.nix inputs) neovimConfiguration mainConfig; - buildPkg = pkgs: modules: - (neovimConfiguration {inherit pkgs modules;}) - .neovim; + buildPkg = pkgs: modules: (neovimConfiguration {inherit pkgs modules;}).neovim; nixConfig = mainConfig false; maximalConfig = mainConfig true; diff --git a/flake/packages.nix b/flake/packages.nix index a87c8a2..a9937b8 100644 --- a/flake/packages.nix +++ b/flake/packages.nix @@ -1,5 +1,6 @@ {inputs, ...}: { perSystem = { + self', system, config, pkgs, @@ -18,6 +19,12 @@ docs-manpages = docs.manPages; docs-json = docs.options.json; + docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" '' + #!${pkgs.stdenv.shell} + # use xdg-open to open the docs in the browser + ${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html} + ''; + # nvim configs nix = config.legacyPackages.neovim-nix; maximal = config.legacyPackages.neovim-maximal;