31 lines
518 B
Nix
31 lines
518 B
Nix
{
|
|
inputs,
|
|
lib,
|
|
formatter,
|
|
system,
|
|
}:
|
|
let
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
fix = {
|
|
type = "app";
|
|
program = lib.getExe (
|
|
pkgs.writeShellApplication {
|
|
name = "fix";
|
|
runtimeInputs = [
|
|
formatter
|
|
pkgs.statix
|
|
pkgs.deadnix
|
|
];
|
|
text = ''
|
|
treefmt
|
|
statix fix .
|
|
deadnix --edit --exclude configs/nixos/hosts/*/hardware-configuration.nix -- .
|
|
treefmt
|
|
'';
|
|
}
|
|
);
|
|
};
|
|
}
|