about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-09-16 15:13:19 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-16 15:13:19 +0300
commit751694df63b34946e1a79d379eac8c35ba40eed1 (patch)
treee1ac51c7ddca63c01c7042f84a0017dd8f75e5fb /flake.nix
parent2022-09-14 (diff)
2022-09-16
Diffstat (limited to '')
-rw-r--r--flake.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 5fd0fb5..68f66d2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -259,8 +259,14 @@
           inherit (self.checks.${system}.preCommit) shellHook;
         };
 
-        # Very opinionated but works fast and doesn't get in a way like nixfmt.
-        formatter = pkgs.alejandra;
+        # This interface is very primitive...
+        formatter = pkgs.writeShellApplication {
+          name = "fmt";
+          runtimeInputs = with pkgs; [alejandra];
+          text = ''
+            alejandra --quiet "$@"
+          '';
+        };
 
         checks.preCommit = pre-commit-hooks.lib.${system}.run {
           src = ./.;

Consider giving Nix/NixOS a try! <3