-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
executable file
Β·240 lines (210 loc) Β· 6.72 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
230
231
232
233
234
235
236
237
238
239
240
{
description = "Dr460nixed NixOS flake βοΈ";
nixConfig = {
extra-substituters = [
"https://cache.garnix.io"
"https://devenv.cachix.org"
];
extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
};
inputs = {
# Chaotic Nyx!
chaotic-nyx = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.home-manager.follows = "home-manager";
inputs.systems.follows = "systems";
};
# Devenv to set up a development environment
devenv = {
url = "github:cachix/devenv";
inputs.flake-compat.follows = "flake-compat";
inputs.nixpkgs.follows = "nixpkgs";
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
};
# Disko for Nix-managed partition management
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Required by some other flakes
flake-compat.url = "github:edolstra/flake-compat";
# Required by some other flakes
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
# Another thing required by other flakes
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
# Garuda Linux flake - most of my system settings are here
garuda-nix = {
# url = "/home/nico/Documents/misc/garuda-nix-subsystem";
url = "gitlab:garuda-linux/garuda-nix-subsystem/main";
inputs.chaotic-nyx.follows = "chaotic-nyx";
inputs.flake-parts.follows = "flake-parts";
inputs.home-manager.follows = "home-manager";
inputs.nix-index-database.follows = "nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
};
# Gitignore common input
gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home-manager for managing my home directory
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Ad and malware blocking hosts file
hosts = {
url = "github:StevenBlack/hosts";
inputs.nixpkgs.follows = "nixpkgs";
};
# Reset rootfs every reboot
impermanence.url = "github:nix-community/impermanence";
# My SSH keys
keys_nico = {
url = "https://github.com/dr460nf1r3.keys";
flake = false;
};
# Lanzaboote for secure boot support
lanzaboote = {
url = "github:nix-community/lanzaboote/master";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-parts.follows = "flake-parts";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
inputs.pre-commit-hooks-nix.follows = "pre-commit-hooks";
};
# Nix gaming-related packages and modules
nix-gaming = {
url = "github:fufexan/nix-gaming";
inputs.flake-parts.follows = "flake-parts";
inputs.nixpkgs.follows = "nixpkgs";
};
# Have a local index of nixpkgs for fast launching of apps
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# Declarative Minecraft server management
nix-minecraft = {
url = "github:Infinidoge/nix-minecraft";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
# Feature-rich and convenient fork of the Nix package manager
nix-super = {
url = "github:privatevoid-net/nix-super";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-parts.follows = "flake-parts";
# inputs.nixpkgs.follows = "nixpkgs"; # Broken as of 240518, needs own instance
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
};
# NixOS generators to build system images
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
# NixOS hardware database
nixos-hardware.url = "github:NixOS/nixos-hardware";
# NixOS WSL
nixos-wsl = {
url = "github:nix-community/nixos-wsl";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
# The source of all truth!
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# Easy linting of the flake and all kind of other stuff
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.flake-compat.follows = "flake-compat";
inputs.gitignore.follows = "gitignore";
inputs.nixpkgs-stable.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
# Secrets management
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
# Spicetify
spicetify-nix = {
url = "github:the-argus/spicetify-nix";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
# Systems flake
systems.url = "github:nix-systems/x86_64-linux";
};
outputs = {
devenv,
flake-parts,
pre-commit-hooks,
...
} @ inp: let
inputs = inp;
perSystem = {
lib,
pkgs,
...
}: {
devenv.shells.default = {
imports = [
./devenv/pre-commit.nix
./devenv/packages.nix
];
cachix = {
enable = true;
pull = [
"chaotic-nyx"
"dr460nf1r3"
"pre-commit-hooks"
];
};
# https://github.com/cachix/devenv/issues/528#issuecomment-1556108767
containers = lib.mkForce {};
difftastic.enable = true;
enterShell = ''
echo "Welcome to Dr460nixed's βοΈ devenv!"
'';
languages = {
nix = {
enable = true;
lsp.package = pkgs.nixd;
};
shell.enable = true;
};
name = "Dr460nixed";
};
# By default, alejandra is WAY to verbose
formatter = pkgs.writeShellScriptBin "alejandra" ''
exec ${pkgs.alejandra}/bin/alejandra --quiet "$@"
'';
};
in
flake-parts.lib.mkFlake {inherit inputs;} {
# Imports flake-modules
imports = [
./nixos/flake-module.nix
./packages/flake-module.nix
inputs.devenv.flakeModule
inputs.pre-commit-hooks.flakeModule
];
# The systems currently available
systems = ["x86_64-linux" "aarch64-linux"];
# This applies to all systems
inherit perSystem;
};
}