-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
99 lines (85 loc) · 2.2 KB
/
flake.nix
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
inputs = {
BetterFox = {
url = "github:yokoffing/BetterFox";
flake = false;
};
cyberdream-theme = {
url = "github:scottmckendry/cyberdream.nvim";
flake = false;
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
mac-app-util.url = "github:hraban/mac-app-util";
nix-darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs = {
url = "github:michaelvanstraten/nixpkgs/add-godns-service";
};
nixpkgs-firefox-darwin = {
url = "github:bandithedoge/nixpkgs-firefox-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators.url = "github:nix-community/nixos-generators";
};
outputs =
{
self,
flake-utils,
nixpkgs,
pre-commit-hooks,
...
}@inputs:
let
inherit ((import ./lib/outputs.nix inputs).lib) callOutputs;
in
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
# Checks pre-commit-hooks
checks = import ./checks { inherit pre-commit-hooks system; };
# Development shell with necessary tools
devShells =
let
pre-commit-check = self.checks.${system}.pre-commit-check;
in
{
default = pkgs.mkShell {
packages = pre-commit-check.enabledPackages ++ [
self.formatter.${system}
# Add other dependencies here
];
inherit (pre-commit-check) shellHook;
};
};
# Formatter for this flake
formatter = pkgs.nixfmt-rfc-style;
}
)
// callOutputs {
directory = ./.;
inherit inputs;
};
}