mirror of
https://gitlab.fabcity.hamburg/software/fab-city-software-kit.git
synced 2024-09-19 20:08:52 +02:00
97 lines
2.5 KiB
Nix
97 lines
2.5 KiB
Nix
{
|
|
description = "Interfacer SWKit";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
};
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
pre-commit-hooks,
|
|
utils,
|
|
...
|
|
}:
|
|
utils.lib.eachDefaultSystem (
|
|
system: let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in {
|
|
checks = {
|
|
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
|
src = utils.lib.cleanSource ./.;
|
|
hooks = {
|
|
alejandra.enable = true;
|
|
nix-linter.enable = true;
|
|
statix .enable = true;
|
|
};
|
|
settings.nix-linter.checks = [
|
|
"DIYInherit"
|
|
"EmptyInherit"
|
|
"EmptyLet"
|
|
"EtaReduce"
|
|
"LetInInheritRecset"
|
|
"ListLiteralConcat"
|
|
"NegateAtom"
|
|
"SequentialLet"
|
|
"SetLiteralUpdate"
|
|
"UnfortunateArgName"
|
|
"UnneededRec"
|
|
"UnusedArg"
|
|
"UnusedLetBind"
|
|
"UpdateEmptySet"
|
|
"BetaReduction"
|
|
"EmptyVariadicParamSet"
|
|
"UnneededAntiquote"
|
|
"no-FreeLetInFunc"
|
|
"no-AlphabeticalArgs"
|
|
"no-AlphabeticalBindings"
|
|
];
|
|
};
|
|
};
|
|
devShell = with pkgs;
|
|
mkShell {
|
|
name = "interfacer.swkit";
|
|
nativeBuildInputs = with pkgs; [
|
|
alejandra
|
|
cmctl
|
|
conftest
|
|
docker
|
|
dotenv-linter
|
|
editorconfig-checker
|
|
git
|
|
gnumake
|
|
k9s
|
|
kube3d
|
|
kubeconform
|
|
kubectl
|
|
kubectx
|
|
kubernetes-helm
|
|
kubeval
|
|
kubeval-schema
|
|
kustomize
|
|
mdl
|
|
mdsh
|
|
nix-linter
|
|
pre-commit
|
|
rnix-lsp
|
|
vscodium-fhs
|
|
yaml-language-server
|
|
yamllint
|
|
yq
|
|
];
|
|
|
|
postInstall = ''
|
|
. <(helm completion $(basename $SHELL))
|
|
. <(k3d completion $(basename $SHELL))
|
|
. <(kubectl completion $(basename $SHELL))
|
|
. <(ct completion $(basename $SHELL))
|
|
'';
|
|
|
|
shellHook = ''
|
|
${self.checks.${system}.pre-commit-check.shellHook}
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|