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
/result*
.direnv/
.pre-commit-config.yaml
result

View file

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