refactor(nix): split formatter and app outputs

This commit is contained in:
2026-09-15 23:38:05 -04:00
parent e31fd9d7a2
commit 3d3c3f7844
4 changed files with 37 additions and 26 deletions

View File

@@ -1,25 +1,16 @@
{
inputs,
lib,
formatter,
system,
}:
let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
settings.formatter.nixfmt.excludes = [
"configs/nixos/hosts/*/hardware-configuration.nix"
];
};
styleCheck = pkgs.writeShellApplication {
name = "style-check";
runtimeInputs = [
treefmtEval.config.build.wrapper
formatter
pkgs.statix
pkgs.deadnix
];
@@ -31,9 +22,7 @@ let
};
in
{
formatter.${system} = treefmtEval.config.build.wrapper;
apps.${system}.style-check = {
style-check = {
type = "app";
program = lib.getExe styleCheck;
};