diff --git a/flake.nix b/flake.nix index 875fa43..4e417e7 100644 --- a/flake.nix +++ b/flake.nix @@ -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 diff --git a/flake/develop.nix b/flake/develop.nix new file mode 100644 index 0000000..3d9d31b --- /dev/null +++ b/flake/develop.nix @@ -0,0 +1,29 @@ +{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 = {}; + in + (lib.nvim.neovimConfiguration { + inherit pkgs; + modules = [configuration]; + }) + .neovim; + }; +}