Full rewrite of devshell
migrates pre-commit to cachix's pre-commit-hooks adds a ton of new hooks: - check-added-large-files - check-case-conflicts - check-json - check-merge-conflicts - detect-private-keys - fmt-check - nil - no-commit-to-branch - statix (disabled for now) migrates devshell to new devshells, set up modularly to have separate functionality for sops, pre-commit-hooks, and our custom packages Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
40
shell.nix
Normal file
40
shell.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
forEachSystem,
|
||||
nixpkgs,
|
||||
checks,
|
||||
sops-nix,
|
||||
...
|
||||
}:
|
||||
|
||||
forEachSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pre-commit = pkgs.mkShell {
|
||||
inherit (checks.${system}.pre-commit-check) shellHook;
|
||||
buildInputs = checks.${system}.pre-commit-check.enabledPackages;
|
||||
};
|
||||
sops = pkgs.mkShell {
|
||||
sopsPGPKeyDirs = [ "./keys" ];
|
||||
packages = [
|
||||
pkgs.sops
|
||||
sops-nix.packages.${system}.sops-import-keys-hook
|
||||
];
|
||||
};
|
||||
rad-dev = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
deadnix
|
||||
pre-commit
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
inputsFrom = [
|
||||
pre-commit
|
||||
rad-dev
|
||||
sops
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
Reference in New Issue
Block a user