diff options
| -rw-r--r-- | checks.nix | 33 | ||||
| -rw-r--r-- | flake.lock | 16 | ||||
| -rw-r--r-- | flake.nix | 25 |
3 files changed, 37 insertions, 37 deletions
diff --git a/checks.nix b/checks.nix deleted file mode 100644 index bf680f1..0000000 --- a/checks.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - pkgs, - self, -}: let - inherit (pkgs) lib; - formatter = self.formatter.${pkgs.system}; -in { - check-actionlint = pkgs.runCommand "check-actionlint" {} '' - ${lib.getExe pkgs.actionlint} ${./.}/.github/workflows/* - touch $out - ''; - - "check-${formatter.pname}" = pkgs.runCommand "check-${formatter.pname}" {} '' - ${lib.getExe formatter} --check ${./.} - touch $out - ''; - - check-selene = pkgs.runCommand "check-selene" {} '' - cd ${./.} - ${lib.getExe pkgs.selene} . - touch $out - ''; - - check-statix = pkgs.runCommand "check-statix" {} '' - ${lib.getExe pkgs.statix} check ${./.} - touch $out - ''; - - check-stylua = pkgs.runCommand "check-stylua" {} '' - ${lib.getExe pkgs.stylua} --check ${./.} - touch $out - ''; -} @@ -1,5 +1,20 @@ { "nodes": { + "flake-checks": { + "locked": { + "lastModified": 1716193450, + "narHash": "sha256-wIbyIQRoLAfGe2v8W7LM6zEZ9Oy0jKuUX0HMUCLQJsM=", + "owner": "getchoo", + "repo": "flake-checks", + "rev": "842c3f225677aa55e44b94342f19c8f3e6f2be06", + "type": "github" + }, + "original": { + "owner": "getchoo", + "repo": "flake-checks", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1715897893, @@ -18,6 +33,7 @@ }, "root": { "inputs": { + "flake-checks": "flake-checks", "nixpkgs": "nixpkgs" } } @@ -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 { |
