Compare commits

..

1 Commits

Author SHA1 Message Date
2513b36705 fix(dotfiles): stop fixing with statix and deadnix 2026-09-16 23:17:35 -04:00
4 changed files with 9 additions and 27 deletions

View File

@@ -3,17 +3,9 @@
lib,
formatter,
system,
ignore,
}:
let
deadnixExcludeArgs = lib.concatStringsSep " " ([ "--exclude" ] ++ ignore);
pkgs = inputs.nixpkgs.legacyPackages.${system};
statixIgnoreArgs = lib.escapeShellArgs (
lib.concatMap (path: [
"--ignore"
(if path == "third_party" then "${path}/**" else path)
]) ignore
);
in
{
fix = {
@@ -23,14 +15,9 @@ in
name = "fix";
runtimeInputs = [
formatter
pkgs.statix
pkgs.deadnix
];
text = ''
treefmt
statix fix ${statixIgnoreArgs} .
deadnix --edit ${deadnixExcludeArgs} -- .
treefmt
'';
}
);

View File

@@ -6,8 +6,6 @@
system,
}:
let
ignore = import ./ignore.nix;
util = import ./util.nix { inherit lib; };
registry = import ./registry.nix {
@@ -45,7 +43,7 @@ in
{
formatter.${system} =
(import ./formatter.nix {
inherit inputs system ignore;
inherit inputs system;
}).config.build.wrapper;
apps.${system} = import ./apps.nix {
@@ -53,7 +51,6 @@ in
inputs
lib
system
ignore
;
formatter = self.formatter.${system};
};

View File

@@ -1,12 +1,14 @@
{
inputs,
system,
ignore,
}:
{ inputs, system }:
inputs.treefmt-nix.lib.evalModule inputs.nixpkgs.legacyPackages.${system} {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
settings.excludes = map (path: if path == "third_party" then "${path}/**" else path) ignore;
settings.excludes = [
"third_party/**"
];
settings.formatter.nixfmt.excludes = [
"configs/nixos/hosts/*/hardware-configuration.nix"
];
}

View File

@@ -1,4 +0,0 @@
[
"third_party"
"configs/nixos/hosts/*/hardware-configuration.nix"
]