From 5a8296d74fd86de63fa441d238b10ccea0b72640 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Wed, 12 Feb 2025 20:00:04 +0100 Subject: [PATCH] flake.nix: Set formatter This enables `nix fmt`, though it won't be practically usable without also reformatting all files, which is done in a following commit. --- ci/default.nix | 1 + flake.nix | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ci/default.nix b/ci/default.nix index 64b89f0217d9..68721e4b35a1 100644 --- a/ci/default.nix +++ b/ci/default.nix @@ -52,6 +52,7 @@ let in { shell = treefmtEval.config.build.devShell; + pkg = treefmtEval.config.build.wrapper; }; in diff --git a/flake.nix b/flake.nix index 83ae9decf803..3cac4f6dd566 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,8 @@ default = import ./shell.nix { inherit system; }; }); + formatter = forAllSystems (system: (import ./ci { inherit system; }).fmt.pkg); + /** A nested structure of [packages](https://nix.dev/manual/nix/latest/glossary#package-attribute-set) and other values.