Compare commits
1 Commits
edf9fdd2b8
...
2513b36705
| Author | SHA1 | Date | |
|---|---|---|---|
| 2513b36705 |
@@ -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
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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};
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[
|
||||
"third_party"
|
||||
"configs/nixos/hosts/*/hardware-configuration.nix"
|
||||
]
|
||||
Reference in New Issue
Block a user