mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Set patched alejandra to be the flakes default formatter
This commit is contained in:
parent
9541e99a78
commit
cb9463a57b
2 changed files with 12 additions and 15 deletions
11
flake.nix
11
flake.nix
|
|
@ -46,6 +46,17 @@
|
|||
};
|
||||
};
|
||||
|
||||
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra.overrideAttrs {
|
||||
passthru.tests.version = {};
|
||||
postPatch = ''
|
||||
substituteInPlace src/alejandra/src/builder.rs \
|
||||
--replace '2 * build_ctx.indentation' '4 * build_ctx.indentation'
|
||||
substituteInPlace src/alejandra/src/rules/string.rs \
|
||||
--replace 'format!(" {}", line)' 'format!(" {}", line)'
|
||||
rm -r src/alejandra/tests
|
||||
'';
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [pkgs.sops];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue