diff options
-rw-r--r-- | flake.nix | 6 | ||||
-rw-r--r-- | ops/ci/default.nix | 5 | ||||
-rw-r--r-- | ops/ci/fmt.nix | 27 | ||||
-rw-r--r-- | ops/ci/shellcheck.nix | 24 |
4 files changed, 1 insertions, 61 deletions
diff --git a/flake.nix b/flake.nix index a77cff1..8afc3c2 100644 --- a/flake.nix +++ b/flake.nix @@ -96,12 +96,6 @@ }; }; - # `nix run .#ci.format` formats in current directory! - apps.ci.format = ci.fmt.mkFmtScript self; - - # `nix run .#ci.shellcheck` formats in current directory! - apps.ci.shellcheck = ci.shell.mkShellCheckScript self; - devShells = { default = pkgs.mkShell { name = "NixOS-config"; diff --git a/ops/ci/default.nix b/ops/ci/default.nix index be0c607..1638b53 100644 --- a/ops/ci/default.nix +++ b/ops/ci/default.nix @@ -1,6 +1,3 @@ { pkgs }: -{ - fmt = import ./fmt.nix pkgs; - shell = import ./shellcheck.nix pkgs; -} +{ } diff --git a/ops/ci/fmt.nix b/ops/ci/fmt.nix deleted file mode 100644 index a3d697c..0000000 --- a/ops/ci/fmt.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, ... }: -let - config = pkgs.writeText "depot-treefmt-config" '' - [formatter.go] - command = "${pkgs.go}/bin/gofmt" - includes = ["*.go"] - - [formatter.nix] - command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" - options = [ "--check"] - includes = [ "*.nix" ] - ''; -in -rec { - mkFmtScript = src: - let - script = pkgs.writeScript "format" '' - set -euo pipefail - ROOT=$(${pkgs.git}/bin/git rev-parse --show-toplevel) - ${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change --config-file ${config} --tree-root $ROOT - ''; - in - { - type = "app"; - program = "${script}"; - }; -} diff --git a/ops/ci/shellcheck.nix b/ops/ci/shellcheck.nix deleted file mode 100644 index c862a87..0000000 --- a/ops/ci/shellcheck.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ pkgs, ... }: rec { - mkShellCheckScript = src: - let - script = pkgs.writeScript "shellcheck" '' - EXIT_STATUS=0 - while IFS= read -r -d ''' i - do - if ${pkgs.shellcheck}/bin/shellcheck -x "$i" - then - echo "$i [ PASSED ]" - else - echo "$i [ FAILED ]" - EXIT_STATUS=$(($EXIT_STATUS+1)) - fi - done < <(find -name '*.sh' -print0) - echo Total Failed Files: $EXIT_STATUS - exit "$EXIT_STATUS" - ''; - in - { - type = "app"; - program = "${script}"; - }; -} |