-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
206 lines (180 loc) · 5.37 KB
/
flake.nix
File metadata and controls
206 lines (180 loc) · 5.37 KB
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
{
description = "orangc's NixOS flake";
inputs = {
# unstable nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; # moves faster, has less packages
# when raf writes documentation for hjem, we'll be switching from home-manager to hjem
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# unstable Hyprland
hyprland.url = "github:hyprwm/Hyprland";
# i don't know if i still want to be using stylix but we'll stick with it
stylix.url = "github:danth/stylix";
# ferris says hi!
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# quickshillin' it
quickshell.url = "git+https://git.outfoxxed.me/quickshell/quickshell";
# fancy nixy neovim
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# secrets management
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# for modules.server.minecraft
nix-minecraft = {
url = "github:infinidoge/nix-minecraft";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# widgets framework configurable in *python*!!
ignis = {
url = "github:ignis-sh/ignis";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# walker (we be walkin') written by a bald man
walker.url = "github:abenz1267/walker";
# for hoyoverse games like genshin and honkai
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# for blocking gambling websites, porn, etc
stevenBlackHosts = {
url = "github:StevenBlack/hosts";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# hjem is a rafware alternative to home-mananager
hjem = {
url = "github:feel-co/hjem";
inputs.nixpkgs.follows = "nixpkgs-small";
};
hjem-rum = {
url = "github:snugnug/hjem-rum";
inputs.nixpkgs.follows = "nixpkgs-small";
inputs.hjem.follows = "hjem";
};
# copyparty is a file server that is awesome
copyparty = {
url = "github:9001/copyparty";
inputs.nixpkgs.follows = "nixpkgs";
};
# so nix-index, nix-locate, and comma can work
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# all in one solution to a media server. for jellyfin, the *arr stack, et cetera
nixflix = {
url = "github:kiriwalawren/nixflix";
inputs.nixpkgs.follows = "nixpkgs";
};
# for declarative DNS
# why my fork? it supports cloudflare proxying
dns-nix = {
url = "git+https://git.orangc.net/c/dns.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# documentation generator. peak rafware
ndg.url = "github:feel-co/ndg";
# an extremely handsome and charming man is the maintainer of this cute little bot
# hint: it's me, i'm the handsome man
takina = {
url = "git+https://git.orangc.net/c/takina";
inputs.nixpkgs.follows = "nixpkgs";
};
# webpagc
webpagc = {
url = "git+https://git.orangc.net/c/webpage";
inputs.nixpkgs.follows = "nixpkgs";
};
# bro just keeps on yapping 🥀🥀
notes-webpage = {
url = "git+https://git.orangc.net/c/notes";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
nixpkgs,
home-manager,
...
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
flakeSettings = {
username = "orangc";
domains = {
primary = "orangc.net";
secondary = "orang.ci";
email = "orangc.net";
tailnet = "cormorant-emperor.ts.net";
};
};
lib = nixpkgs.lib.extend (
final: _prev: {
my = import ./lib {
lib = final;
inherit flakeSettings;
};
}
);
customPkgs = import ./pkgs {
inherit
inputs
pkgs
lib
system
flakeSettings
;
};
nixosMachine =
{ host }:
lib.nixosSystem {
specialArgs = {
inherit
inputs
system
host
flakeSettings
;
};
modules = [
./hosts/${host}/config.nix
home-manager.nixosModules.home-manager
(lib.mkAliasOptionModule [ "hm" ] [ "home-manager" "users" flakeSettings.username ])
# hjem.nixosModules.default
{
home-manager = {
extraSpecialArgs = {
inherit
inputs
system
host
flakeSettings
;
};
useUserPackages = true;
backupFileExtension = "backup";
users.${flakeSettings.username} = import ./hosts/${host}/home.nix;
};
}
];
};
in
{
packages.${system} = customPkgs;
formatter.${system} = pkgs.nixfmt;
nixosConfigurations = {
komashi = nixosMachine { host = "komashi"; };
sirius = nixosMachine { host = "sirius"; };
gensokyo = nixosMachine { host = "gensokyo"; };
};
};
}