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
+9 -6
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
use nix 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
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
+27 -42
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 = [
# dev tools
pkgs.just
pkgs.npins
treefmt.config.build.wrapper
packages = # helm
with pkgs; pkgs.helmfile
[ pkgs.kubernetes-helm
# dev tools
just
npins
# helm # kubectl tools
helmfile pkgs.kubectl-cnpg
kubernetes-helm pkgs.kubectl-neat
pkgs.kubectl-graph
pkgs.kubectl-klock
pkgs.kubectl-rook-ceph
# kubectl tools # other tools activate when needed
kubectl-cnpg # pkgs.step-cli
kubectl-neat # pkgs.linkerd
kubelogin # pkgs.cmctl
kubelogin-oidc # pkgs.rclone
kubectl-rook-ceph # pkgs.velero
kubectl-graph # pkgs.renovate
kubectl-klock # pkgs.graphviz
graphviz # pkgs.hubble
hubble # pkgs.dapr-cli
];
# other tools activate when needed
# step-cli
# linkerd
# cmctl
# rclone
# velero
renovate
# dapr
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"
'';
}; };
}; };
} }