snowfield/shell.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2024-04-05 00:33:26 +02:00
let
inputs = import ./deps;
2024-04-07 14:33:13 +02:00
pkgs = import inputs.unstable { };
2024-04-05 00:33:26 +02:00
nixos-anywhere = pkgs.callPackage "${inputs.nixos-anywhere}/src/default.nix" { };
2024-04-05 19:29:45 +02:00
agenix = pkgs.callPackage "${inputs.agenix}/pkgs/agenix.nix" { };
2024-07-12 16:31:09 +02:00
bootstrap = pkgs.callPackage scripts/bootstrap-machine.nix { inherit nixos-anywhere; };
update-deps = pkgs.callPackage scripts/update-deps.nix { };
pre-commit-hook =
(import (
pkgs.applyPatches {
name = "patched-git-hooks";
src = inputs.git-hooks;
patches = [ ./patches/hooks-correct-nixfmt.patch ];
}
)).run
{
src = ./.;
2024-04-07 14:33:13 +02:00
hooks = {
statix.enable = true;
deadnix.enable = true;
rfc101 = {
enable = true;
name = "RFC-101 formatting";
entry = "${pkgs.lib.getExe pkgs.nixfmt-rfc-style}";
files = "\\.nix$";
};
commitizen.enable = true;
};
2024-04-07 14:33:13 +02:00
};
2024-04-05 00:33:26 +02:00
in
pkgs.mkShell {
2024-04-07 14:33:13 +02:00
nativeBuildInputs = with pkgs; [
colmena
npins
agenix
bootstrap
2024-07-12 16:31:09 +02:00
update-deps
2024-04-07 14:33:13 +02:00
statix
2024-07-10 00:36:02 +02:00
rbw
pinentry
2024-04-07 14:33:13 +02:00
];
shellHook = ''
${pre-commit-hook.shellHook}
'';
2024-04-05 00:33:26 +02:00
}