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:
parent
ea9e8d7489
commit
c2eac1a161
2 changed files with 43 additions and 46 deletions
|
@ -60,9 +60,10 @@
|
||||||
inputs.treefmt-nix.flakeModule
|
inputs.treefmt-nix.flakeModule
|
||||||
./effect.nix
|
./effect.nix
|
||||||
./shell.nix
|
./shell.nix
|
||||||
./treefmt.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
perSystem.treefmt.imports = [ ./treefmt.nix ];
|
||||||
|
|
||||||
flake.nixosConfigurations =
|
flake.nixosConfigurations =
|
||||||
let
|
let
|
||||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{
|
{ pkgs, ... }: {
|
||||||
perSystem = { pkgs, ... }: {
|
|
||||||
treefmt = {
|
|
||||||
# Used to find the project root
|
# Used to find the project root
|
||||||
projectRootFile = "flake.lock";
|
projectRootFile = "flake.lock";
|
||||||
|
|
||||||
|
@ -49,6 +47,4 @@
|
||||||
includes = [ "*.py" ];
|
includes = [ "*.py" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue