From 86e655057e0bad7b997152e19b65084143b5dfde Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= <dev@felschr.com>
Date: Thu, 12 May 2022 11:31:18 +0200
Subject: [PATCH] feat(flake): add shellcheck to pre-commit-check

---
 flake.nix                | 5 ++++-
 scripts/create-gpg-key   | 1 +
 scripts/setup-partitions | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/flake.nix b/flake.nix
index dc14c1a..3f843cb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -176,7 +176,10 @@
         pkgs = nixpkgs.legacyPackages.${system};
         pre-commit-check = pre-commit-hooks.lib.${system}.run {
           src = ./.;
-          hooks = { nixfmt.enable = true; };
+          hooks = {
+            nixfmt.enable = true;
+            shellcheck.enable = true;
+          };
         };
       in {
         formatter = nixpkgs.legacyPackages."${system}".nixfmt;
diff --git a/scripts/create-gpg-key b/scripts/create-gpg-key
index b6a859d..eac9946 100755
--- a/scripts/create-gpg-key
+++ b/scripts/create-gpg-key
@@ -1,5 +1,6 @@
 #! /usr/bin/env nix-shell
 #! nix-shell -i bash -p bash gnupg
+# shellcheck shell=bash
 
 set -euo pipefail
 
diff --git a/scripts/setup-partitions b/scripts/setup-partitions
index d00421a..3402ffd 100755
--- a/scripts/setup-partitions
+++ b/scripts/setup-partitions
@@ -1,5 +1,6 @@
 #! /usr/bin/env nix-shell
 #! nix-shell -i bash -p bash parted cryptsetup btrfs-progs
+# shellcheck shell=bash
 
 set -euo pipefail