build(flake): add nix devShell
Problem: no nix dev shell existed, making it harder to get local tooling for formatting, linting, and type checking. Solution: add a flake with a devShell providing prettier, stylua, selene, and lua-language-server.
This commit is contained in:
parent
7891879b4e
commit
f52dd06c26
1 changed files with 30 additions and 0 deletions
30
flake.nix
Normal file
30
flake.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
description = "midnight.nvim — a dark colorscheme for Neovim";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
nixpkgs,
|
||||||
|
systems,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
forEachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells = forEachSystem (pkgs: {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
pkgs.prettier
|
||||||
|
pkgs.stylua
|
||||||
|
pkgs.selene
|
||||||
|
pkgs.lua-language-server
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue