diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f636820..00b9be1 120000 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1 +1 @@ -/nix/store/f6q34qz3fmnjqv3blhy0nb5sdp94jhva-pre-commit-config.json \ No newline at end of file +/nix/store/zlf0hrr61mqr4bkjndn922cj615q447g-pre-commit-config.json \ No newline at end of file diff --git a/flake.nix b/flake.nix index 569b491..48b2ad3 100644 --- a/flake.nix +++ b/flake.nix @@ -147,6 +147,7 @@ hooks = { deadnix.enable = true; + shellcheck.enable = true; statix.enable = true; treefmt.enable = true; }; diff --git a/home/programs/scripts/attic-system-cache b/home/programs/scripts/attic-system-cache index 0f30017..d4a4405 100755 --- a/home/programs/scripts/attic-system-cache +++ b/home/programs/scripts/attic-system-cache @@ -6,7 +6,7 @@ export IFS=' ' echo "Uploading $OUT_PATHS ..." -if /run/current-system/sw/bin/attic push nifoc-systems $OUT_PATHS; then +if /run/current-system/sw/bin/attic push nifoc-systems "$OUT_PATHS"; then exit 0 else echo "Ignoring error ..." diff --git a/home/programs/scripts/copy-git-repo-contents b/home/programs/scripts/copy-git-repo-contents index 815ebfd..2d29d1c 100755 --- a/home/programs/scripts/copy-git-repo-contents +++ b/home/programs/scripts/copy-git-repo-contents @@ -1,15 +1,16 @@ #!/usr/bin/env nix-shell #!nix-shell -i bash -p coreutils findutils rsync +# shellcheck disable=SC1008 current="$PWD" src="$(realpath "$1")" dst="$(realpath "$2")" -cd "$dst" +cd "$dst" || exit find . -not -path './.git/*' -not -path './.git' -not -path '.' -not -path '..' -print0 | xargs -0 rm -rf rsync -ax "$src/" ./ --exclude .git --exclude deps --exclude _build rm -rf ./.gitlab rm -f ./.gitlab-ci.yml -cd "$current" +cd "$current" || exit