flake: provide dev package

This commit is contained in:
diniamo 2024-11-12 22:34:13 +01:00 committed by raf
parent a07e113f3a
commit 947cf90878
2 changed files with 32 additions and 14 deletions

View file

@ -21,6 +21,7 @@
./flake/legacyPackages.nix
./flake/overlays.nix
./flake/packages.nix
./flake/develop.nix
];
flake = {
@ -56,20 +57,7 @@
};
};
perSystem = {
self',
config,
pkgs,
...
}: {
devShells = {
default = self'.devShells.lsp;
nvim-nix = pkgs.mkShell {packages = [config.packages.nix];};
lsp = pkgs.mkShell {
packages = with pkgs; [nil statix deadnix alejandra];
};
};
perSystem = {pkgs, ...}: {
# Provide the default formatter. `nix fmt` in project root
# will format available files with the correct formatter.
# P.S: Please do not format with nixfmt! It messes with many

30
flake/develop.nix Normal file
View file

@ -0,0 +1,30 @@
{lib, ...}: {
perSystem = {
pkgs,
config,
self',
...
}: {
devShells = {
default = self'.devShells.lsp;
nvim-nix = pkgs.mkShellNoCC {packages = [config.packages.nix];};
lsp = pkgs.mkShellNoCC {
packages = with pkgs; [nil statix deadnix alejandra];
};
};
# This package exists to make development easier by providing the place and
# boilerplate to build a test nvf configuration. Feel free to use this for
# testing, but make sure to discard the changes before creating a pull
# request.
packages.dev = let
configuration = {};
customNeovim = lib.nvim.neovimConfiguration {
inherit pkgs;
modules = [configuration];
};
in
customNeovim.neovim;
};
}