-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
238 lines (209 loc) · 7.49 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
###############################################
# ▗▄▄▄ ▗▄▄▄▄ ▄▄▄▖ #
# ▜███▙ ▜███▙ ▟███▛ #
# ▜███▙ ▜███▙▟███▛ #
# ▜███▙ ▜██████▛ #
# ▟█████████████████▙ ▜████▛ ▟▙ #
# ▟███████████████████▙ ▜███▙ ▟██▙ #
# ▄▄▄▄▖ ▜███▙ ▟███▛ #
# ▟███▛ ▜██▛ ▟███▛ #
# ▟███▛ ▜▛ ▟███▛ #
# ▟███████████▛ ▟██████████▙ #
# ▜██████████▛ ▟███████████▛ #
# ▟███▛ ▟▙ ▟███▛ #
# ▟███▛ ▟██▙ ▟███▛ #
# ▟███▛ ▜███▙ ▝▀▀▀▀ #
# ▜██▛ ▜███▙ ▜██████████████████▛ #
# ▜▛ ▟████▙ ▜████████████████▛ #
# ▟██████▙ ▜███▙ #
# ▟███▛▜███▙ ▜███▙ #
# ▟███▛ ▜███▙ ▜███▙ #
# ▝▀▀▀ ▀▀▀▀▘ ▀▀▀▘ #
# --------------------------------------- #
# Author -> V 7 <[email protected]> #
# License -> MIT #
# URL -> github:maydayv7/dotfiles #
# Version -> v25 #
# --------------------------------------- #
# Welcome to Ground Zero! #
# The Very Heart of my 'dotfiles' #
###############################################
{
description = ''
My Self-Contained, Purely Reproducible, Hermetic, Declarative, Automated, Extensible
Multi-PC NixOS Configuration and 'dotfiles'
'';
## Repositories ##
inputs = {
## Package Repositories ##
# NixOS Packages Repository
nixpkgs.follows = "stable";
stable.url = "github:NixOS/nixpkgs?ref=nixos-24.11";
# Unstable Packages Repository
unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
# Proprietary Software
proprietary = {
url = "github:maydayv7/proprietary";
inputs.nixpkgs.follows = "stable";
};
# Packaged Games
gaming = {
url = "github:fufexan/nix-gaming";
inputs.flake-parts.follows = "framework";
};
## Configuration Modules ##
## Language Addendum
# Supported Architectures
systems = {
url = "github:maydayv7/dotfiles?ref=systems";
flake = false;
};
# Flakes Framework
framework = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "stable";
};
# Flake Utility Functions
utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
# Source Filter Functions
filters.url = "github:numtide/nix-filter";
# Syntax Formatter
formatter = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "stable";
};
## Feature Modules
# User Home Manager
home-manager = {
url = "github:nix-community/home-manager?ref=release-24.11";
inputs.nixpkgs.follows = "stable";
};
# Hardware Support
hardware.url = "github:NixOS/nixos-hardware";
# Secure Boot
boot = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs = {
nixpkgs.follows = "stable";
flake-parts.follows = "framework";
flake-utils.follows = "utils";
};
};
# Authentication Credentials Manager
sops = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "unstable";
};
# File System Persistent State Handler
impermanence.url = "github:nix-community/impermanence";
# System Image Generators
generators = {
url = "github:nix-community/nixos-generators";
inputs = {
nixlib.follows = "stable";
nixpkgs.follows = "unstable";
};
};
# Nix Index Database
index = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "stable";
};
# Base16 Theming
stylix = {
url = "github:danth/stylix?ref=release-24.11";
inputs = {
nixpkgs.follows = "stable";
systems.follows = "systems";
flake-utils.follows = "utils";
home-manager.follows = "home-manager";
};
};
# Declarative Flatpak Wrapper
flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
# Spicetify Module
spotify = {
url = "github:Gerg-L/spicetify-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
systems.follows = "systems";
};
};
# VS Code Extensions
vsppuccin.url = "github:catppuccin/vscode";
vscode = {
url = "github:nix-community/nix-vscode-extensions";
inputs = {
nixpkgs.follows = "stable";
flake-utils.follows = "utils";
};
};
# Windows Apps Wrapper
windows = {
url = "github:emmanuelrosa/erosanix";
inputs.nixpkgs.follows = "unstable";
};
};
## Configuration ##
outputs = {self, ...} @ inputs: let
inherit (inputs.stable) lib;
map = import ./lib/map.nix lib;
in
inputs.framework.lib.mkFlake {inherit inputs;} {
inherit (self) systems;
debug = false;
_module.args = {util = self.lib;};
imports = map.flake ./.;
flake = {
# Supported Architectures
systems = import inputs.systems;
## Custom Library Functions ##
lib =
lib.recursiveUpdate (map.modules ./lib (file: import file lib))
{
nixpkgs = lib;
build.device = import ./modules/configuration.nix inputs;
};
## Configuration Template ##
templates.default = with inputs.filters.lib; {
description = "My NixOS Configuration";
path = filter {
root = ./.;
exclude = [
./checks
./site
(matchExt "md")
(matchExt "secret")
];
};
};
};
};
## Nix Configuration ##
nixConfig = {
commit-lockfile-summary = "chore(flake): Update `inputs`";
# Binary Caches
trusted-substituters = [
"https://maydayv7-dotfiles.cachix.org"
"https://cache.nixos.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://nix-gaming.cachix.org"
"https://nixpkgs-unfree.cachix.org"
"https://catppuccin.cachix.org"
];
# Public Keys
trusted-public-keys = [
"maydayv7-dotfiles.cachix.org-1:dpECO0Z2ZMttY6JgWHuAR5M7cqeyfFjUsvHdnMz+j6U="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
"catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU="
];
};
}