diff options
Diffstat (limited to 'parts/dev.nix')
| -rw-r--r-- | parts/dev.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/parts/dev.nix b/parts/dev.nix new file mode 100644 index 0000000..5453286 --- /dev/null +++ b/parts/dev.nix @@ -0,0 +1,45 @@ +{ + inputs, + self, + ... +}: { + perSystem = { + pkgs, + system, + ... + }: { + checks = { + pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { + src = self; + hooks = { + actionlint.enable = true; + alejandra.enable = true; + deadnix.enable = true; + nil.enable = true; + statix.enable = true; + stylua.enable = true; + }; + }; + }; + + devShells = let + inherit (pkgs) mkShell; + in { + default = mkShell { + inherit (self.checks.${system}.pre-commit-check) shellHook; + packages = with pkgs; + with inputs; [ + actionlint + alejandra + deadnix + just + ragenix.packages.${system}.ragenix + statix + stylua + ]; + }; + }; + + formatter = pkgs.alejandra; + }; +} |
