-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
229 lines (223 loc) · 6.58 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
/*
Every file used from anything in a flake _MUST_ and I repeat, _MUST_ be checked into git
*/
{
description = "Hopefully this _is_ my final form";
inputs = {
wezterm = {
url = "github:wez/wezterm?dir=nix";
};
ags = {
url = "github:Aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
phinger-hypr.url = "github:Jappie3/hyprcursor-phinger";
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended
};
# hyprpanel = {
# url = "github:M0NsTeRRR/HyprPanel";
# # inputs.nixpkgs.follows = "nixos_unstable";
# };
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
eza = {
url = "github:eza-community/eza/v0.11.0";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixos_unstable.url = "github:nixos/nixpkgs/nixos-unstable";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
dmux = {
url = "github:zdcthomas/dmux";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
# inputs.nixpkgs.follows = "nixpkgs";
inputs.neovim-src = {
url = "github:neovim/neovim?dir=contrib&rev=27fb62988e922c2739035f477f93cc052a4fee1e";
flake = false;
};
};
nur = {
url = "github:nix-community/NUR";
};
nix-colors = {
url = "github:misterio77/nix-colors";
};
font = {
url = "git+ssh://[email protected]/zdcthomas/PP.git?shallow=1";
flake = false;
};
};
outputs = {
self,
nixpkgs,
home-manager,
darwin,
nixos-hardware,
...
} @ inputs: let
# overlays add/change values in pkgs, e.g
# change neovim version/ add NUR
overlays = import ./nix/overlays {inherit inputs;};
mk_home_username_and_dir = {
username,
homeDirectoryPrefix ? "/Users/",
}: {
config,
pkgs,
...
}: {
home.username = username;
home.homeDirectory = homeDirectoryPrefix + username;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
home.stateVersion = "22.05"; # Did you read the comment?
};
inherit (nixpkgs) lib;
in {
darwinConfigurations = let
workHostName = "Zacharys-MacBook-Pro";
in {
"${workHostName}" = let
username = "zdcthomas";
in
darwin.lib.darwinSystem rec {
system = "aarch64-darwin";
specialArgs = {
inherit system username overlays inputs workHostName;
};
modules = [
{nixpkgs.overlays = overlays;}
home-manager.darwinModule
./nix/hosts/work/dar_conf.nix
];
};
Prime = let
username = "zacharythomas";
in
darwin.lib.darwinSystem rec {
system = "x86_64-darwin";
specialArgs = {
inherit system username overlays inputs;
};
modules = [
{nixpkgs.overlays = overlays;}
home-manager.darwinModule
./nix/hosts/prime/dar_conf.nix
];
};
};
nixosConfigurations = {
# ------------------
# | Thinkpad |
# ------------------
nixos = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
inherit overlays;
inherit system;
username = "zdcthomas";
};
modules = [
nixos-hardware.nixosModules.lenovo-thinkpad
inputs.hyprland.nixosModules.default
({...}: {
nixpkgs.overlays =
overlays
++ [
# inputs.neovim-nightly-overlay.overlay
];
})
./nix/hosts/thinkpad/configuration.nix
];
};
opt = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
inherit overlays;
inherit system;
username = "opt";
};
modules = [
inputs.hyprland.nixosModules.default
({...}: {
nixpkgs.overlays =
overlays;
})
nixos-hardware.nixosModules.framework-16-7040-amd
./nix/hosts/opt/configuration.nix
];
};
# ---------------------
# | Home Server |
# ---------------------
lar =
nixpkgs.lib.nixosSystem
rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs overlays system;
};
modules = [
({...}: {
nixpkgs.overlays = overlays;
})
./nix/hosts/lar/configuration.nix
./nix/hosts/lar/hardware-configuration.nix
];
};
};
};
nixConfig = {
extra-substituters = [
"https://cache.nixos.org?priority=10"
"https://nix-community.cachix.org"
"https://anyrun.cachix.org"
"https://hyprland.cachix.org"
];
extra-trusted-public-keys = [
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
}