-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
216 lines (190 loc) · 5.6 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
# geonkick 2
geonkick = {
url = "github:Geonkick-Synthesizer/geonkick/v2.10.2";
flake = false;
};
# packages for moza wheel
moza-racing-wheel = {
url = "github:computerdane/moza-racing-wheel-nix";
# inputs.nixpkgs.follows = "nixpkgs";
};
# realtime audio
musnix.url = "github:musnix/musnix";
# neorg overlay for up-to-date neorg stuff
# neorg.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
# color utils
nix-colorizer.url = "github:nutsalhan87/nix-colorizer";
# updated minecraft servers
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
# ai
nixified-ai.url = "github:nixified-ai/flake";
# extra hardware configuration
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# latest wayland packages
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
# neovim config in nix
nixvim.url = "github:nix-community/nixvim";
# for runtime-decrypted secrets
sops-nix.url = "github:Mic92/sops-nix";
# for system themes and styling
stylix.url = "github:danth/stylix";
# neovim plugins
gen-nvim = {
url = "github:David-Kunz/gen.nvim";
flake = false;
};
mini-nvim = {
url = "github:echasnovski/mini.nvim";
flake = false;
};
# my stuff
iosevka-muse.url = "git+https://codeberg.org/municorn/iosevka-muse?ref=main";
muni-bot.url = "github:muni-corn/muni_bot";
muse-shell.url = "github:muni-corn/muse-shell";
muse-sounds.url = "git+https://codeberg.org/municorn/muse-sounds?ref=main";
muni-wallpapers = {
url = "github:muni-corn/muni-wallpapers";
flake = false;
};
plymouth-theme-musicaloft-rainbow.url = "git+https://codeberg.org/municorn/plymouth-theme-musicaloft-rainbow?ref=main";
};
outputs = {
nixpkgs,
home-manager,
geonkick,
iosevka-muse,
mini-nvim,
muni-bot,
muse-shell,
muse-sounds,
musnix,
# neorg,
nix-minecraft,
nixified-ai,
nixos-hardware,
nixpkgs-wayland,
nixvim,
plymouth-theme-musicaloft-rainbow,
...
} @ inputs: let
customPackagesOverlay = final: prev: {
ardour = prev.ardour.overrideAttrs (old: {
version = "8.10";
src = prev.fetchgit {
url = "git://git.ardour.org/ardour/ardour.git";
rev = "8.10";
hash = "sha256-y4eNo0ukRL6v0T1XvJ46sYnsiVSdL527punnkmf/TIU=";
};
});
muse-shell = muse-shell.packages.${prev.system}.default;
geonkick = prev.geonkick.overrideAttrs (old: {
src = geonkick;
});
vimPlugins =
prev.vimPlugins
// {
mini-nvim = prev.vimPlugins.mini-nvim.overrideAttrs (old: {
src = mini-nvim;
});
};
};
overlaysModule = {
nixpkgs.overlays = [
iosevka-muse.overlay
muse-sounds.overlay
# neorg.overlays.default
nix-minecraft.overlay
nixpkgs-wayland.overlays.default
plymouth-theme-musicaloft-rainbow.overlay
customPackagesOverlay
];
};
binaryCachesModule = {
nix.settings = {
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
substituters = [
"https://cache.nixos.org"
"https://nixpkgs-wayland.cachix.org"
"https://hyprland.cachix.org"
];
};
};
homeManagerModule = {
home-manager = {
backupFileExtension = "backup";
extraSpecialArgs = {
inherit inputs;
};
sharedModules = [nixvim.homeManagerModules.nixvim];
useGlobalPkgs = true;
useUserPackages = true;
users.muni = ./muni;
};
};
commonModules = [
binaryCachesModule
overlaysModule
];
commonGraphicalModules = [
home-manager.nixosModules.home-manager
musnix.nixosModules.musnix
homeManagerModule
];
littleponyModules =
commonModules
++ commonGraphicalModules
++ [
nixos-hardware.nixosModules.framework-16-7040-amd
./laptop
];
ponycastleModules =
commonModules
++ commonGraphicalModules
++ [
# hardware
nixos-hardware.nixosModules.common-pc
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-gpu-amd
nixos-hardware.nixosModules.common-pc-ssd
./desktop
];
spiritcryptModules =
commonModules
++ [
# hardware
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc
nixos-hardware.nixosModules.common-gpu-nvidia
# extra software configuration modules
nixified-ai.nixosModules.invokeai-nvidia
muni-bot.nixosModules.default
./server
];
in {
nixosConfigurations = {
littlepony = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
system = "x86_64-linux";
modules = littleponyModules;
};
ponycastle = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
system = "x86_64-linux";
modules = ponycastleModules;
};
spiritcrypt = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
system = "x86_64-linux";
modules = spiritcryptModules;
};
};
};
}