mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-12-26 22:24:59 +08:00
add treefmt
This commit is contained in:
parent
53c853fb1a
commit
5d6bbabd23
2 changed files with 38 additions and 0 deletions
11
flake.nix
11
flake.nix
|
|
@ -95,6 +95,10 @@
|
|||
in
|
||||
{
|
||||
home-manager = self.legacyPackages.${system}.homeConfigurations.sops.activation-script;
|
||||
treefmt =
|
||||
(pkgs.callPackage ./formatter.nix {
|
||||
inputs = privateInputs;
|
||||
}).config.build.check;
|
||||
}
|
||||
// (suffix-stable packages-stable)
|
||||
// nixpkgs.lib.optionalAttrs pkgs.stdenv.isLinux tests
|
||||
|
|
@ -131,6 +135,13 @@
|
|||
}
|
||||
);
|
||||
|
||||
formatter = eachSystem (
|
||||
{ pkgs, ... }:
|
||||
(pkgs.callPackage ./formatter.nix {
|
||||
inputs = privateInputs;
|
||||
}).config.build.wrapper
|
||||
);
|
||||
|
||||
apps = eachSystem (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
|
|
|||
27
formatter.nix
Normal file
27
formatter.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
inputs.treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = ".git/config";
|
||||
|
||||
programs = {
|
||||
nixfmt.enable = true;
|
||||
|
||||
deadnix.enable = true;
|
||||
deno.enable = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
global.excludes = [
|
||||
"./pkgs/sops-install-secrets/test-assets/*"
|
||||
"*.narHash"
|
||||
# unsupported extensions
|
||||
"*.{asc,pub,gpg}"
|
||||
"*/secrets.{bin,json,ini,yaml}"
|
||||
];
|
||||
|
||||
formatter = {
|
||||
deadnix = {
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue