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
# the shebang is ignored, but nice for editors
watch_file nix/sources.json
watch_file nix/checks.nix
watch_file npins/sources.json
# Load .env file if it exists
dotenv_if_exists
# Set npins dir
export NPINS_DIRECTORY="nix"
# 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
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",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre930822.ed142ab1b3a0/nixexprs.tar.xz",
"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
+23 -38
View File
@@ -1,68 +1,53 @@
let
sources = import ./nix;
sources = import ./npins;
system = builtins.currentSystem;
pkgs = import sources.nixpkgs {
inherit system;
config = { };
overlays = [ ];
};
checks = import ./nix/checks.nix;
treefmt = import ./nix/treefmt.nix { };
in
pkgs.mkShellNoCC {
name = "clstr";
packages =
with pkgs;
[
packages = [
# dev tools
just
npins
pkgs.just
pkgs.npins
treefmt.config.build.wrapper
# helm
helmfile
kubernetes-helm
pkgs.helmfile
pkgs.kubernetes-helm
# kubectl tools
kubectl-cnpg
kubectl-neat
kubelogin
kubelogin-oidc
kubectl-rook-ceph
kubectl-graph
kubectl-klock
graphviz
hubble
pkgs.kubectl-cnpg
pkgs.kubectl-neat
pkgs.kubectl-graph
pkgs.kubectl-klock
pkgs.kubectl-rook-ceph
# other tools activate when needed
# step-cli
# linkerd
# cmctl
# rclone
# velero
renovate
# dapr
dapr-cli
]
++ checks.enabledPackages;
# pkgs.step-cli
# pkgs.linkerd
# pkgs.cmctl
# pkgs.rclone
# pkgs.velero
# pkgs.renovate
# pkgs.graphviz
# pkgs.hubble
# pkgs.dapr-cli
];
# Environment variables
ARGOCD_ENV_CLUSTER_NAME = "oceanbox";
HELM_GIT_ACCESS_TOKEN = "glpat-xxx";
shellHook = builtins.concatStringsSep "\n" [
checks.shellHook
];
# Alternative shells
passthru = pkgs.lib.mapAttrs (name: value: pkgs.mkShellNoCC (value // { inherit name; })) {
ci-shell = {
packages = [
pkgs.npins
];
shellHook = ''
export NPINS_DIRECTORY="nix"
'';
};
};
}