From 31fa5bbfa0a6e6c43402da34c97da4045f83f7a5 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Fri, 26 Jul 2019 10:02:05 -0500 Subject: [PATCH] add formatting script --- format.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 format.sh diff --git a/format.sh b/format.sh new file mode 100755 index 0000000..8f9ee9a --- /dev/null +++ b/format.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail +nix-shell \ + --pure \ + -p 'import (fetchTarball https://github.com/serokell/nixfmt/archive/e4f31f45799554ff378370256a24f606a3025b0a.tar.gz) {}' \ + --run 'find . -name "*.nix" -not -ipath "*home-manager*" | xargs nixfmt --width 120'