From 0e778d32bec2a0e8b828e4679c8e887ff6516cbf Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Thu, 1 Sep 2022 11:49:36 -0600 Subject: [PATCH] fmt: use 'nix fmt' --- flake.nix | 8 ++++---- fmt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 2fe9a18..1ac2041 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,7 @@ stable.url = "github:NixOS/nixpkgs/nixos-22.05-small"; - nixos-hardware = { - url = "github:NixOS/nixos-hardware/master"; - }; + nixos-hardware = { url = "github:NixOS/nixos-hardware/master"; }; emacs-overlay = { url = "github:nix-community/emacs-overlay"; @@ -86,7 +84,6 @@ go jq nix-diff - nixfmt sops ssh-to-age ssh-to-pgp @@ -121,6 +118,9 @@ }; }; + formatter.x86_64-linux = stable.legacyPackages.x86_64-linux.nixfmt; + formatter.aarch64-darwin = stable.legacyPackages.aarch64-darwin.nixfmt; + devShells.x86_64-linux.default = buildShell pkgs; devShells.aarch64-darwin.default = buildShell darwinPkgs; diff --git a/fmt b/fmt index 780ca6a..8479bed 100755 --- a/fmt +++ b/fmt @@ -1,6 +1,6 @@ #!/bin/sh for i in $(find . -name \*.nix ); do - nixfmt $i + nix fmt $i done statix check .