mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Switch to the formatting tool treefmt
This commit is contained in:
parent
003b0151f9
commit
f5a827eacf
2 changed files with 31 additions and 1 deletions
11
flake.nix
11
flake.nix
|
|
@ -28,6 +28,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-vscode-extensions = {
|
||||
url = "github:nix-community/nix-vscode-extensions";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -74,6 +79,10 @@
|
|||
|
||||
devShells.${system}.default = pkgs.mkShell { packages = [ pkgs.sops ]; };
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
formatter.${system} =
|
||||
(inputs.treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt-rfc-style.enable = true;
|
||||
}).config.build.wrapper;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue