switch from alejandra -> nixpkgs-fmt

alejandra has someone questionable choices for formatting that no one would apply to there code if they would format manually.
nixpkgs-fmt seems to produce more readable results.
This commit is contained in:
Jörg Thalheim
2023-07-21 11:14:54 +02:00
parent cf583e2d44
commit 9aaac528f8
11 changed files with 64 additions and 65 deletions

View File

@@ -1,16 +1,15 @@
{
self,
inputs,
...
{ self
, inputs
, ...
}: {
imports = [
inputs.treefmt-nix.flakeModule
];
perSystem = {pkgs, ...}: {
perSystem = { pkgs, ... }: {
treefmt.projectRootFile = "flake.nix";
treefmt.flakeCheck = true;
treefmt.flakeFormatter = true;
treefmt.programs.alejandra.enable = true;
treefmt.programs.nixpkgs-fmt.enable = true;
treefmt.programs.shellcheck.enable = true;
};
}

View File

@@ -1,4 +1,4 @@
{self, ...}: {
{ self, ... }: {
flake.packages.x86_64-linux = {
inherit
(self.nixosConfigurations.installer.config.formats)

View File

@@ -1,4 +1,4 @@
{self, ...}: {
{ self, ... }: {
pre-commit.settings.hooks.alejandra.enable = true;
pre-commit.settings.hooks.shellcheck.enable = true;
}