nix: add formatter

This commit is contained in:
Primrose 2025-02-05 22:11:34 +01:00
parent aaa2cdc548
commit 0d1453541c
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 22 additions and 0 deletions

20
nix/formatter/default.nix Normal file
View file

@ -0,0 +1,20 @@
{ nixpkgs, systems, ... }:
let
inherit (nixpkgs) lib;
in
{
formatter =
let
formatterOf =
system:
let
pkgs = import nixpkgs { inherit system; };
in
pkgs.nixfmt-rfc-style;
in
lib.genAttrs systems formatterOf;
}