bring back treefmt

rm git-hooks
This commit is contained in:
cy 2025-01-16 16:56:31 -05:00
parent acb4987357
commit 64cb83cddb
2 changed files with 16 additions and 80 deletions

72
flake.lock generated
View file

@ -80,22 +80,6 @@
} }
}, },
"flake-compat_2": { "flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@ -206,34 +190,12 @@
} }
}, },
"git-hooks": { "git-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737043064,
"narHash": "sha256-I/OuxGwXwRi5gnFPsyCvVR+IfFstA+QXEpHu1hvsgD8=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "94ee657f6032d913fe0ef49adaa743804635b0bb",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"git-hooks_2": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"nixvim", "nixvim",
"flake-compat" "flake-compat"
], ],
"gitignore": "gitignore_3", "gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
@ -254,27 +216,6 @@
} }
}, },
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
@ -296,7 +237,7 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_3": { "gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@ -390,7 +331,7 @@
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
@ -498,9 +439,9 @@
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"git-hooks": "git-hooks_2", "git-hooks": "git-hooks",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": [ "nixpkgs": [
@ -552,7 +493,7 @@
"lanzaboote", "lanzaboote",
"flake-compat" "flake-compat"
], ],
"gitignore": "gitignore_2", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
"nixpkgs" "nixpkgs"
@ -577,7 +518,6 @@
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",

View file

@ -28,10 +28,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
}; };
@ -51,7 +47,6 @@
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
treefmt,
disko, disko,
flake-parts, flake-parts,
... ...
@ -60,7 +55,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
inputs.git-hooks.flakeModule inputs.treefmt.flakeModule
]; ];
debug = true; debug = true;
systems = [ systems = [
@ -68,7 +63,6 @@
]; ];
perSystem = perSystem =
{ {
pkgs,
system, system,
... ...
}: }:
@ -81,14 +75,16 @@
}; };
}; };
pre-commit = { treefmt = {
check.enable = true; projectRootFile = "flake.nix";
settings.hooks = { programs.nixfmt.enable = true;
nixfmt-rfc-style.enable = true; programs.stylua.enable = true;
}; programs.yamlfmt.enable = true;
}; programs.typos.enable = true;
programs.shellcheck.enable = true;
formatter = pkgs.nixfmt-rfc-style; settings.global.excludes = [ "secrets/*" ];
};
}; };
flake = { flake = {