nix: Refactor treefmt; use flake-root
This commit is contained in:
parent
33436a1fde
commit
c9c69b1afc
1 changed files with 5 additions and 5 deletions
10
flake.nix
10
flake.nix
|
@ -36,10 +36,14 @@
|
||||||
# Auto formatters. This also adds a flake check to ensure that the
|
# Auto formatters. This also adds a flake check to ensure that the
|
||||||
# source tree was auto formatted.
|
# source tree was auto formatted.
|
||||||
treefmt.config = {
|
treefmt.config = {
|
||||||
|
inherit (config.flake-root) projectRootFile;
|
||||||
package = pkgs.treefmt;
|
package = pkgs.treefmt;
|
||||||
projectRootFile = "flake.nix";
|
|
||||||
|
|
||||||
programs.ormolu.enable = true;
|
programs.ormolu.enable = true;
|
||||||
|
programs.nixpkgs-fmt.enable = true;
|
||||||
|
programs.cabal-fmt.enable = true;
|
||||||
|
|
||||||
|
# We use fourmolu
|
||||||
programs.ormolu.package = pkgs.haskellPackages.fourmolu;
|
programs.ormolu.package = pkgs.haskellPackages.fourmolu;
|
||||||
settings.formatter.ormolu = {
|
settings.formatter.ormolu = {
|
||||||
options = [
|
options = [
|
||||||
|
@ -47,10 +51,6 @@
|
||||||
"-XImportQualifiedPost"
|
"-XImportQualifiedPost"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.nixpkgs-fmt.enable = true;
|
|
||||||
|
|
||||||
programs.cabal-fmt.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Dev shell scripts.
|
# Dev shell scripts.
|
||||||
|
|
Loading…
Reference in a new issue