nixos-config/shell.nix
2020-11-14 10:15:41 +01:00

24 lines
416 B
Nix

let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs { };
nix-pre-commit-hooks = import sources."pre-commit-hooks.nix";
pre-commit-check = nix-pre-commit-hooks.run {
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
};
};
in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
git
niv
nixpkgs-fmt
];
shellHook = ''
${pre-commit-check.shellHook}
'';
}