diff options
| author | NotAShelf <raf@notashelf.dev> | 2024-09-13 17:51:48 +0300 |
|---|---|---|
| committer | Matthieu Coudron <886074+teto@users.noreply.github.com> | 2024-09-15 15:43:28 +0200 |
| commit | 46ce5fd8c081f179a509da423077f8372e63ffc4 (patch) | |
| tree | 4391d2d04531220083f4954ba30f16e8fce6fa4c /flake.nix | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.gz nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.bz2 nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.lz nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.xz nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.tar.zst nvim-lspconfig-46ce5fd8c081f179a509da423077f8372e63ffc4.zip | |
chore: remove redundant flake-utils dependency; add nix-systems
Removes the redundant flake-utils dependency, and replaces
multi-system handling logic with a minimal function (zero deps!) that
supports [nix-systems](https://github.com/nix-systems). This gets rid of
the unnecessary flake-utils dependency.
Also see:
* https://ayats.org/blog/no-flake-utils
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 32 |
1 files changed, 17 insertions, 15 deletions
@@ -2,20 +2,22 @@ description = "Quickstart configurations for the Nvim LSP client"; inputs.nixpkgs.url = "github:NixOS/nixpkgs"; - inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.systems.url = "github:nix-systems/default"; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let pkgs = nixpkgs.legacyPackages.${system}; in - rec { - devShell = pkgs.mkShell { - buildInputs = [ - pkgs.stylua - pkgs.luaPackages.luacheck - pkgs.luajitPackages.vusted - pkgs.selene - ]; - }; - } - ); + outputs = { self, nixpkgs, systems }: let + supportedSystems = nixpkgs.lib.genAttrs (import systems); + forEachSystem = function: supportedSystems (system: + function nixpkgs.legacyPackages.${system}); + in { + devShells = forEachSystem (pkgs: { + default = pkgs.mkShell { + packages = [ + pkgs.stylua + pkgs.luaPackages.luacheck + pkgs.luajitPackages.vusted + pkgs.selene + ]; + }; + }); + }; } |
