mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
formatter: remove script, add treefmt.toml + keep-sorted (#7056)
currently ./format does a bunch of stuff with git that was only necessary for nixfmt but not nixfmt-tree, so I deleted it (just use treefmt command directly instead). I also added keep sorted to keep the really long module lists sorted (already used in nixpkgs).
This commit is contained in:
parent
559f6d36b3
commit
3f591550a9
10 changed files with 494 additions and 503 deletions
23
flake.nix
23
flake.nix
|
|
@ -45,22 +45,25 @@
|
|||
}
|
||||
// (
|
||||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
||||
forAllPkgs =
|
||||
f:
|
||||
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system});
|
||||
in
|
||||
{
|
||||
formatter = forAllSystems (
|
||||
system:
|
||||
nixpkgs.legacyPackages.${system}.nixfmt-tree.override {
|
||||
settings = {
|
||||
tree-root-file = "release.json";
|
||||
};
|
||||
formatter = forAllPkgs (
|
||||
pkgs:
|
||||
pkgs.treefmt.withConfig {
|
||||
runtimeInputs = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
keep-sorted
|
||||
];
|
||||
settings = pkgs.lib.importTOML ./treefmt.toml;
|
||||
}
|
||||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
packages = forAllPkgs (
|
||||
pkgs:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
releaseInfo = nixpkgs.lib.importJSON ./release.json;
|
||||
docs = import ./docs {
|
||||
inherit pkgs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue