refactor(nix): split formatter and app outputs
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user