patch: update gitignore and fixed issue in flake.nix (#62)

- Added direnv/ dir to gitignore
- Fixed a small fuck up in the flake.nix I made
This commit is contained in:
Roel de Cort 2024-11-26 10:03:36 +01:00 committed by GitHub
parent 1d21dc5879
commit be4ef31521
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 29 deletions

5
.gitignore vendored
View file

@ -1,2 +1,3 @@
/.pre-commit-config.yaml .direnv/
/result* .pre-commit-config.yaml
result

View file

@ -28,39 +28,44 @@
"x86_64-darwin" "x86_64-darwin"
]; ];
perSystem = { perSystem =
system, {
pkgs, system,
self', pkgs,
lib, self',
... lib,
}: let ...
nixvimLib = nixvim.lib.${system}; }:
nixvim' = nixvim.legacyPackages.${system}; let
nixvimModule = { nixvimLib = nixvim.lib.${system};
inherit pkgs; nixvim' = nixvim.legacyPackages.${system};
module = import ./config; # import the module directly nixvimModule = {
# You can use `extraSpecialArgs` to pass additional arguments to your module files inherit pkgs;
extraSpecialArgs = { module = import ./config; # import the module directly
# inherit (inputs) foo; # You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
# inherit (inputs) foo;
};
}; };
}; nvim = nixvim'.makeNixvimWithModule nixvimModule;
nvim = nixvim'.makeNixvimWithModule nixvimModule; in
in {
{ checks = {
checks = { default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule; pre-commit-check = pre-commit-hooks.lib.${system}.run {
pre-commit-check = pre-commit-hooks.lib.${system}.run { src = ./.;
src = ./.; hooks = {
hooks = { statix.enable = true;
statix.enable = true; nixfmt-rfc-style.enable = true;
nixfmt-rfc-style.enable = true; };
}; };
}; };
formatter = pkgs.nixfmt-rfc-style; formatter = pkgs.nixfmt-rfc-style;
packages.default = nvim; packages = {
default = nvim;
};
devShells = { devShells = {
default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; }; default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; };