mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
feat: improve formatting
This commit is contained in:
parent
c098800c79
commit
47075799d6
5 changed files with 89 additions and 6 deletions
|
|
@ -1,6 +1,28 @@
|
|||
_:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem = { pkgs, ... }: {
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
# formatter = pkgs.nixpkgs-fmt;
|
||||
# formatter is set by treefmt to:
|
||||
# formatter = lib.mkIf config.treefmt.flakeFormatter (lib.mkDefault config.treefmt.build.wrapper);
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs = {
|
||||
nixfmt = {
|
||||
enable = true;
|
||||
package = pkgs.nixpkgs-fmt;
|
||||
};
|
||||
deadnix.enable = true;
|
||||
statix.enable = true;
|
||||
shellcheck.enable = true;
|
||||
};
|
||||
settings.formatter.shellcheck.options = [
|
||||
"--shell"
|
||||
"bash"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue