summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2024-07-04 16:04:59 -0400
committerseth <[email protected]>2024-07-04 16:11:35 -0400
commit81437144b4a279fc72f1d7911c19df833c9b83ad (patch)
treed7ce98c75be73963e5403a26312360f7ca28ea70
parentab84656f19fe2bd7053d54d6eee60aa3efa8898b (diff)
nix: drop flake-checks
-rw-r--r--flake.lock16
-rw-r--r--flake.nix52
2 files changed, 33 insertions, 35 deletions
diff --git a/flake.lock b/flake.lock
index 70607d3..6af95cc 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,20 +1,5 @@
{
"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": 1719468428,
@@ -33,7 +18,6 @@
},
"root": {
"inputs": {
- "flake-checks": "flake-checks",
"nixpkgs": "nixpkgs"
}
}
diff --git a/flake.nix b/flake.nix
index 5351034..3366a2a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,17 +1,10 @@
{
description = "seth's website";
- inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
- flake-checks.url = "github:getchoo/flake-checks";
- };
+ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs =
- {
- self,
- nixpkgs,
- flake-checks,
- }:
+ { self, nixpkgs }:
let
inherit (nixpkgs) lib;
systems = [
@@ -28,18 +21,39 @@
checks = forAllSystems (
system:
let
- flake-checks' = flake-checks.lib.mkChecks {
- root = ./.;
- pkgs = nixpkgsFor.${system};
- };
+ pkgs = nixpkgsFor.${system};
in
{
- inherit (flake-checks')
- actionlint
- alejandra
- deadnix
- statix
- ;
+ check-lint =
+ pkgs.runCommand "check-lint"
+ {
+ nativeBuildInputs = [
+ pkgs.actionlint
+ pkgs.deadnix
+ pkgs.statix
+ ];
+ }
+ ''
+ echo "running actionlint..."
+ actionlint ${self}/.github/workflows/*
+
+ echo "running deadnix..."
+ deadnix --fail ${self}
+
+ echo "running statix..."
+ statix check ${self}
+
+ touch $out
+ '';
+
+ check-formatting =
+ pkgs.runCommand "check-formatting" { nativeBuildInputs = [ pkgs.nixfmt-rfc-style ]; }
+ ''
+ echo "running nixfmt..."
+ nixfmt --check ${self}
+
+ touch $out
+ '';
}
);