-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevshell.nix
More file actions
25 lines (25 loc) · 743 Bytes
/
devshell.nix
File metadata and controls
25 lines (25 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ nixpkgs, pre-commit-hooks, flake-utils, home-manager, nix-darwin, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pre-commit = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks.nixpkgs-fmt.enable = true;
};
in
{
checks.pre-commit-check = pre-commit;
devShell = pkgs.mkShell {
inherit (pre-commit) shellHook;
buildInputs = with pkgs; [ nixpkgs-fmt statix just ];
};
formatter = pkgs.nixpkgs-fmt;
apps.home-manager = {
type = "app";
program = "${home-manager.packages.${system}.home-manager}/bin/home-manager";
};
apps.darwin-rebuild = {
type = "app";
program = "${nix-darwin.packages.${system}.darwin-rebuild}/bin/darwin-rebuild";
};
})