From be4ef315211dde979a2e88688b8f45d19109989c Mon Sep 17 00:00:00 2001 From: Roel de Cort <63876068+dc-tec@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:03:36 +0100 Subject: [PATCH] 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 --- .gitignore | 5 +++-- flake.nix | 59 +++++++++++++++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index d014379..64a32d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/.pre-commit-config.yaml -/result* +.direnv/ +.pre-commit-config.yaml +result diff --git a/flake.nix b/flake.nix index f906bff..84cb5f8 100644 --- a/flake.nix +++ b/flake.nix @@ -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; };