summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--checks.nix51
-rw-r--r--flake.lock16
-rw-r--r--flake.nix2
3 files changed, 35 insertions, 34 deletions
diff --git a/checks.nix b/checks.nix
index b813d83..56c5038 100644
--- a/checks.nix
+++ b/checks.nix
@@ -1,23 +1,42 @@
-{ inputs, ... }:
{
perSystem =
- { lib, pkgs, ... }:
+ { pkgs, ... }:
{
checks = {
- inherit
- (inputs.flake-checks.lib.mkChecks {
- inherit pkgs;
- root = lib.fileset.toSource {
- root = ./.;
- fileset = lib.fileset.gitTracked ./.;
- };
- })
- actionlint
- alejandra
- deadnix
- editorconfig
- statix
- ;
+ check-formatting =
+ pkgs.runCommand "check-formatting" { nativeBuildInputs = [ pkgs.nixfmt-rfc-style ]; }
+ ''
+ cd ${./.}
+
+ echo "running nixfmt..."
+ nixfmt --check .
+
+ touch $out
+ '';
+
+ check-lint =
+ pkgs.runCommand "check-lint"
+ {
+ nativeBuildInputs = [
+ pkgs.actionlint
+ pkgs.deadnix
+ pkgs.statix
+ ];
+ }
+ ''
+ cd ${./.}
+
+ echo "running actionlint..."
+ actionlint ./.github/workflows/*
+
+ echo "running deadnix..."
+ deadnix --fail
+
+ echo "running statix..."
+ statix check .
+
+ touch $out
+ '';
};
};
}
diff --git a/flake.lock b/flake.lock
index 848aa66..2e317a0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -115,21 +115,6 @@
"type": "sourcehut"
}
},
- "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"
- }
- },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -421,7 +406,6 @@
"arkenfox": "arkenfox",
"catppuccin": "catppuccin",
"firefox-addons": "firefox-addons",
- "flake-checks": "flake-checks",
"flake-parts": "flake-parts",
"getchvim": "getchvim",
"home-manager": "home-manager",
diff --git a/flake.nix b/flake.nix
index 52af7a9..547b020 100644
--- a/flake.nix
+++ b/flake.nix
@@ -82,8 +82,6 @@
};
};
- flake-checks.url = "github:getchoo/flake-checks";
-
getchvim = {
url = "github:getchoo/getchvim";
inputs.nixpkgs.follows = "nixpkgs";