-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
255 lines (219 loc) · 7.96 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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
{
description = "Aeon | NixOS flake";
inputs = {
# SECTION: Core inputs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
# SECTION: Nix libraries.
# Nix flake framework.
snowfall-lib = {
url = "github:mxxntype/snowfall";
inputs.nixpkgs.follows = "nixpkgs";
};
# Standalone library for the Nix language.
nix-std.url = "github:chessai/nix-std";
# Atomic secret provisioning for NixOS.
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Persistent state on systems with ephemeral root storage.
impermanence.url = "github:nix-community/impermanence";
# Collection of image builders.
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
# Declarative disk partitioning and formatting using Nix.
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Generate infrastructure and network diagrams directly from your NixOS configurations.
nix-topology = {
url = "github:oddlama/nix-topology";
inputs.nixpkgs.follows = "nixpkgs";
};
# SECTION: Hardware.
# Lanzaboote, UEFI secure boot for NixOS.
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
# NixOS modules covering hardware quirks.
hardware.url = "github:nixos/nixos-hardware";
# SECTION: Nix libraries for building stuff.
# Rust toolchains and rust-analyzer nightly.
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Pure and reproducible nix overlay of binary distributed rust toolchains.
# (Alternative to Fenix)
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
# Cargo build systems for Nix.
naersk.url = "github:nix-community/naersk";
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
# An experimental Nushell environment for Nix.
nuenv = {
url = "github:DeterminateSystems/nuenv";
inputs.nixpkgs.follows = "nixpkgs";
};
# SECTION: Hyprland and plugins.
#
# Hyprland *really* cares about matching versions of everything, so to be sure these are with tags.
# The wacky URL is because of https://github.com/hyprwm/Hyprland/issues/5891#issuecomment-2094865630.
# NOTE: The hyprland's `package` is (for now) the one provided by `nixpgks`, not the one from here.
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland.git?ref=refs/tags/v0.44.0&submodules=1";
inputs.hyprutils.follows = "hyprutils";
};
# NOTE: Due to *something*, Hyprland's derivation gets an old and incompatible version of `hyprutils`
# and fails to build. Perhaps that will be resolved with an update or something, but for now explicitly
# pinning this to a tag and overriding `hyprland`'s corresponding input seems to fix the build.
hyprutils = {
url = "github:hyprwm/hyprutils?ref=v0.2.3";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins?ref=v0.44.0";
inputs.hyprland.follows = "hyprland";
};
hyprland-hy3 = {
url = "github:outfoxxed/hy3?ref=hl0.44.0";
inputs.hyprland.follows = "hyprland";
};
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
# SECTION: Misc flakes.
# A nice and configurable Zellij statusbar.
zjstatus = {
url = "github:dj95/zjstatus";
inputs.nixpkgs.follows = "nixpkgs";
};
# NOTE: I manually package the Zen browser for myself.
#
# HACK: This does, however, mean that I will need to manually tweak the `version` here if I wish to update it.
zen-browser-appimage = {
url = "https://github.com/zen-browser/desktop/releases/download/1.0.0-a.37/zen-specific.AppImage";
flake = false;
};
# SECTION: My other flakes.
helix = {
url = "github:mxxntype/helix";
inputs.nixpkgs.follows = "nixpkgs";
};
siren = {
url = "github:mxxntype/siren";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprquery = {
url = "github:mxxntype/hyprquery";
inputs.nixpkgs.follows = "nixpkgs";
};
reddot = {
url = "github:mxxntype/reddot";
inputs.nixpkgs.follows = "nixpkgs";
};
ndrs = {
url = "git+ssh://[email protected]/mxxntype/ndrs.git";
inputs.nixpkgs.follows = "nixpkgs";
};
swp = {
url = "git+ssh://[email protected]/mxxntype/swp.git";
inputs = {
nixpkgs.follows = "nixpkgs";
snowfall-lib.follows = "snowfall-lib";
};
};
invar = {
url = "github:exoumoon/invar";
inputs.nixpkgs.follows = "nixpkgs";
};
# SECTION: Non-flake inputs.
csvlens = {
url = "github:YS-L/csvlens";
flake = false;
};
bluetui = {
url = "github:pythops/bluetui";
flake = false;
};
repalette = {
url = "github:ziap/repalette";
flake = false;
};
srgn = {
url = "github:alexpovel/srgn";
flake = false;
};
};
outputs = inputs: inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
# Snowfall Lib configuration.
snowfall = {
namespace = "aeon";
meta = {
name = "aeon";
title = "Aeon | NixOS flake";
};
};
channels-config = {
allowUnfree = true;
permittedInsecurePackages = [ ];
};
# Global NixOS modules.
systems.modules.nixos = with inputs; [
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
disko.nixosModules.disko
hyprland.nixosModules.default
# nix-topology.nixosModules.default
];
# Overlays for Nixpkgs.
overlays = with inputs; [
nuenv.overlays.nuenv
fenix.overlays.default
rust-overlay.overlays.default
swp.overlays."package/swp"
# nix-topology.overlays.default
];
templates = {
rust = {
path = ./templates/rust;
description = "Rust crate template for cargo-generate";
};
typst = {
path = ./templates/typst;
description = "Typst paper template for writing neat documents";
};
};
alias = {
shells.default = "bootstrap";
packages.default = "aeon";
};
# NOTE: An example for future self.
# outputs-builder = channels: {
# topology = import inputs.nix-topology {
# pkgs = channels.nixpkgs;
# modules = [
# { inherit (outputs) nixosConfigurations; }
# ];
# };
# };
};
}