treefmt: flatten the config

By importing the config on the treefmt module level, it makes the config
more flat, and also compatible with non-flake-parts users.
This commit is contained in:
zimbatm 2023-04-12 10:15:26 +02:00
parent ea9e8d7489
commit c2eac1a161
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
2 changed files with 43 additions and 46 deletions

View file

@ -60,9 +60,10 @@
inputs.treefmt-nix.flakeModule
./effect.nix
./shell.nix
./treefmt.nix
];
perSystem.treefmt.imports = [ ./treefmt.nix ];
flake.nixosConfigurations =
let
inherit (inputs.nixpkgs.lib) nixosSystem;

View file

@ -1,6 +1,4 @@
{
perSystem = { pkgs, ... }: {
treefmt = {
{ pkgs, ... }: {
# Used to find the project root
projectRootFile = "flake.lock";
@ -49,6 +47,4 @@
includes = [ "*.py" ];
};
};
};
};
}