From 03ae4c610e806e8e49659af9e6c832b93e0d58e7 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sat, 24 May 2025 23:57:40 +0200 Subject: [PATCH] feat: add formatter for Nix files --- flake.nix | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index 60b8c34..a0a33a7 100644 --- a/flake.nix +++ b/flake.nix @@ -13,8 +13,15 @@ }; }; - outputs = { self, nixpkgs, flake-utils, rust-overlay }: - flake-utils.lib.eachSystem ["x86_64-linux"] (system: + outputs = + { + self, + nixpkgs, + flake-utils, + rust-overlay, + }: + flake-utils.lib.eachSystem [ "x86_64-linux" ] ( + system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; @@ -31,20 +38,24 @@ cargoLock.lockFile = ./Cargo.lock; doCheck = true; }; - in { - packages.rustPackage = appRustBuild; + in + { + packages.pumoSystemInfo = appRustBuild; + formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; defaultPackage = appRustBuild; - devShell = with pkgs; mkShell { - buildInputs = [ - bacon - cargo - cargo-deny - cargo-msrv - cargo-tarpaulin - just - rustVersion - ]; - }; + devShell = + with pkgs; + mkShell { + buildInputs = [ + bacon + cargo + cargo-deny + cargo-msrv + cargo-tarpaulin + just + rustVersion + ]; + }; } ); }