From 62933d57b8740d1bdfa48f0a0efbdd8a80f6ccd6 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 May 2024 21:08:11 -0400 Subject: nix: use flake-checks --- flake.nix | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index ae25b25..a4ea185 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,15 @@ { description = "getchoo's neovim config"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-checks.url = "github:getchoo/flake-checks"; + }; outputs = { self, nixpkgs, + flake-checks, }: let systems = [ "x86_64-linux" @@ -14,10 +18,23 @@ "aarch64-darwin" ]; - forSystem = system: fn: fn nixpkgs.legacyPackages.${system}; - forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: forSystem system fn); + forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system}); in { - checks = forAllSystems (pkgs: import ./checks.nix {inherit pkgs self;}); + checks = forAllSystems (pkgs: let + flake-checks' = flake-checks.lib.mkChecks { + root = ./.; + inherit pkgs; + }; + in { + inherit + (flake-checks') + actionlint + alejandra + selene + statix + stylua + ; + }); devShells = forAllSystems (pkgs: { default = pkgs.mkShellNoCC { -- cgit v1.2.3