fix: Remove git hooks

This commit is contained in:
2026-02-17 15:39:40 +01:00
parent f14f604579
commit ad1bae4e8e
6 changed files with 120 additions and 48 deletions
+8 -5
View File
@@ -1,13 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# the shebang is ignored, but nice for editors # the shebang is ignored, but nice for editors
watch_file nix/sources.json watch_file npins/sources.json
watch_file nix/checks.nix
# Load .env file if it exists # Load .env file if it exists
dotenv_if_exists dotenv_if_exists
# Set npins dir
export NPINS_DIRECTORY="nix"
# Activate development shell # Activate development shell
if type lorri &>/dev/null; then
echo "direnv: using lorri from PATH ($(type -p lorri))"
eval "$(lorri direnv)"
else
# fall back to using direnv's builtin nix support
# to prevent bootstrapping problems.
use nix use nix
fi
+71
View File
@@ -0,0 +1,71 @@
{
sources ? import ../npins,
pkgs ? import sources.nixpkgs { },
treefmt ? import sources.treefmt-nix,
}:
let
globalExcludes = [
"npins/default.nix"
"attic"
"vcluster"
".*vendor"
".*chart/.*"
".*schema.json"
];
in
treefmt.evalModule pkgs {
projectRootFile = ".git/config";
settings = {
excludes = globalExcludes;
};
programs = {
# --- Nix formatting ---
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
statix.enable = true;
deadnix.enable = true;
# --- Shell ---
shellcheck = {
enable = true;
excludes = [
"vcluster/"
"attic/"
];
};
shfmt.enable = true;
# --- YAML ---
yamllint = {
enable = true;
excludes = [
"attic/"
"charts/templates/"
"charts/"
"values/"
"vcluster/"
];
settings = {
extends = "default";
rules = {
document-start = "disable";
line-length = {
max = 300;
};
};
};
};
# --- JSON ---
jsonfmt.enable = true;
# Optional: keep JSON sorted
# prettier.enable = true;
};
}
View File
+13
View File
@@ -18,6 +18,19 @@
"name": "nixpkgs-unstable", "name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre930822.ed142ab1b3a0/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre930822.ed142ab1b3a0/nixexprs.tar.xz",
"hash": "sha256-XH6awru9NnBc/m+2YhRNT8r1PAKEiPGF3gs//F3ods0=" "hash": "sha256-XH6awru9NnBc/m+2YhRNT8r1PAKEiPGF3gs//F3ods0="
},
"treefmt-nix": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "numtide",
"repo": "treefmt-nix"
},
"branch": "main",
"submodules": false,
"revision": "337a4fe074be1042a35086f15481d763b8ddc0e7",
"url": "https://github.com/numtide/treefmt-nix/archive/337a4fe074be1042a35086f15481d763b8ddc0e7.tar.gz",
"hash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk="
} }
}, },
"version": 7 "version": 7
+23 -38
View File
@@ -1,68 +1,53 @@
let let
sources = import ./nix; sources = import ./npins;
system = builtins.currentSystem; system = builtins.currentSystem;
pkgs = import sources.nixpkgs { pkgs = import sources.nixpkgs {
inherit system; inherit system;
config = { }; config = { };
overlays = [ ]; overlays = [ ];
}; };
checks = import ./nix/checks.nix; treefmt = import ./nix/treefmt.nix { };
in in
pkgs.mkShellNoCC { pkgs.mkShellNoCC {
name = "clstr"; packages = [
packages =
with pkgs;
[
# dev tools # dev tools
just pkgs.just
npins pkgs.npins
treefmt.config.build.wrapper
# helm # helm
helmfile pkgs.helmfile
kubernetes-helm pkgs.kubernetes-helm
# kubectl tools # kubectl tools
kubectl-cnpg pkgs.kubectl-cnpg
kubectl-neat pkgs.kubectl-neat
kubelogin pkgs.kubectl-graph
kubelogin-oidc pkgs.kubectl-klock
kubectl-rook-ceph pkgs.kubectl-rook-ceph
kubectl-graph
kubectl-klock
graphviz
hubble
# other tools activate when needed # other tools activate when needed
# step-cli # pkgs.step-cli
# linkerd # pkgs.linkerd
# cmctl # pkgs.cmctl
# rclone # pkgs.rclone
# velero # pkgs.velero
renovate # pkgs.renovate
# pkgs.graphviz
# dapr # pkgs.hubble
dapr-cli # pkgs.dapr-cli
] ];
++ checks.enabledPackages;
# Environment variables # Environment variables
ARGOCD_ENV_CLUSTER_NAME = "oceanbox"; ARGOCD_ENV_CLUSTER_NAME = "oceanbox";
HELM_GIT_ACCESS_TOKEN = "glpat-xxx"; HELM_GIT_ACCESS_TOKEN = "glpat-xxx";
shellHook = builtins.concatStringsSep "\n" [
checks.shellHook
];
# Alternative shells # Alternative shells
passthru = pkgs.lib.mapAttrs (name: value: pkgs.mkShellNoCC (value // { inherit name; })) { passthru = pkgs.lib.mapAttrs (name: value: pkgs.mkShellNoCC (value // { inherit name; })) {
ci-shell = { ci-shell = {
packages = [ packages = [
pkgs.npins pkgs.npins
]; ];
shellHook = ''
export NPINS_DIRECTORY="nix"
'';
}; };
}; };
} }