feat(nix): add style tooling
This commit was merged in pull request #52.
This commit is contained in:
28
src/dotfiles/apps.nix
Normal file
28
src/dotfiles/apps.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
formatter,
|
||||
system,
|
||||
}:
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
fix = {
|
||||
type = "app";
|
||||
program = lib.getExe (pkgs.writeShellApplication {
|
||||
name = "fix";
|
||||
runtimeInputs = [
|
||||
formatter.config.build.wrapper
|
||||
pkgs.statix
|
||||
pkgs.deadnix
|
||||
];
|
||||
text = ''
|
||||
treefmt
|
||||
statix fix .
|
||||
deadnix --edit --exclude configs/nixos/hosts/*/hardware-configuration.nix -- .
|
||||
treefmt
|
||||
'';
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user