From 3002c765a3c0d14bc95c207bebd17d8585cbe1f9 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sat, 6 Aug 2022 14:57:45 +0800 Subject: [PATCH] flake: add formatter attribute in the output --- README.adoc | 3 +++ flake.nix | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/README.adoc b/README.adoc index 3dc6dd0d..cfe56d1c 100644 --- a/README.adoc +++ b/README.adoc @@ -85,6 +85,9 @@ Though, these are just templates mostly for my own purposes so it is not as usef * `lib` is defined from link:./lib/[my custom library]. It's another unnecessary export but it's there. +* `formatter` is the preferred formatter to be used for my Nix files. +Nothing special here. + === The remote repo diff --git a/flake.nix b/flake.nix index 086069b2..5e8d18c9 100644 --- a/flake.nix +++ b/flake.nix @@ -341,5 +341,10 @@ description = "Basic development shell template"; }; }; + + # No amount of formatters will make this codebase nicer but it sure does + # feel like it does. + formatter = + forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt); }; }