-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
238 lines (209 loc) · 7.15 KB
/
Copy pathflake.nix
File metadata and controls
238 lines (209 loc) · 7.15 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
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
{
description = "Home Manager configuration of gipphe";
outputs =
inputs@{
self,
treefmt-nix,
nixpkgs,
...
}:
let
systems = [
"aarch64-linux"
"x86_64-linux"
];
eachSystem =
f:
nixpkgs.lib.genAttrs systems (
system:
f {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
}
);
environments = import ./environments inputs;
in
{
formatter = eachSystem ({ system, ... }: self.packages.${system}.treefmt);
devShells = eachSystem (
{ pkgs, system }:
let
util = pkgs.callPackage ./util.nix { };
in
{
default = pkgs.callPackage ./devShells/default.nix {
inherit (self.packages.${system}) jujutsu;
inherit (util) writeNushellApplication;
};
}
);
packages = eachSystem (
{ pkgs, ... }:
let
util = pkgs.callPackage ./util.nix { };
in
{
md-fastfetch = pkgs.callPackage ./packages/md-fastfetch.nix {
inherit (util) writeNushellApplication;
};
md-icons = pkgs.callPackage ./packages/md-icons.nix { inherit (util) writeNushellApplication; };
treefmt = pkgs.callPackage ./packages/treefmt.nix { inherit treefmt-nix; };
mo2installer = pkgs.callPackage ./packages/mo2installer.nix { };
fluorine-manager = pkgs.callPackage ./packages/fluorine-manager.nix { };
}
// (
let
x = self.nixosConfigurations.titanium.config.home-manager.users.gipphe.wrappers;
in
{
jujutsu = x.jujutsu.wrapper;
git = x.git.wrapper;
}
)
);
overlays = {
atuin = final: prev: {
inherit (inputs.atuin.packages.${final.stdenv.hostPlatform.system}) atuin;
};
};
checks = eachSystem (
{ pkgs, system, ... }:
let
inherit (pkgs) lib;
filterSystem = lib.filterAttrs (_: c: c.pkgs.stdenv.hostPlatform.system == system);
mkNixosCheck = name: x: {
name = "nixos-${name}";
value = x.config.system.build.toplevel;
};
# mkNixOnDroidCheck = name: x: {
# name = "nix-on-droid-${name}";
# value = x.activationPackage;
# };
in
lib.pipe self.nixosConfigurations [
filterSystem
(lib.mapAttrs' mkNixosCheck)
]
# // lib.pipe self.nixOnDroidConfigurations [
# filterSystem
# (lib.mapAttrs' mkNixOnDroidCheck)
# ]
);
images.sodium = self.nixosConfigurations.sodium.config.system.build.image;
inherit (environments)
nixOnDroidConfigurations
nixosConfigurations
;
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
# TODO: Remove this once this issue is resolved:
# https://github.com/nix-community/nix-on-droid/issues/495
nixpkgs-last-working-for-nix-on-droid.url = "github:NixOS/nixpkgs/88d3861";
nix-on-droid = {
url = "github:nix-community/nix-on-droid";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
wlib = {
url = "github:BirdeeHub/nix-wrapper-modules";
inputs.nixpkgs.follows = "nixpkgs";
};
nu_scripts = {
url = "github:nushell/nu_scripts";
flake = false;
};
# Do not override its nixpkgs input, since it uses bleeding edge versions
# of specific packages
nix-gaming.url = "github:fufexan/nix-gaming";
# Do not override its nixpkgs input, otherwise there can be mismatch
# between patches and kernel version
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel";
# Do not override its nixpkgs input, nixpkgs contains packages that are too
# up-to-date for comfyui
comfyui.url = "github:Gipphe/comfyui-nix";
# Do not override its nixpkgs input, it is configured for specific versions
# of each of the plugins
giphtvim.url = "github:Gipphe/giphtvim";
# Do not override its nixpkgs input, it invalidates the cachix cache, and
# will probably break things.
hyprland.url = "github:hyprwm/Hyprland";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-db = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Do not override its nixpkgs input, it invalidates the cachix cache, and
# will probably break things.
noctalia.url = "github:noctalia-dev/noctalia/cachix";
tricorder.url = "github:tweag/tricorder";
dolphin-overlay = {
url = "github:Gipphe/dolphin-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
# TODO: Remove once 18.20.0 is in nixos-unstable
atuin = {
url = "github:atuinsh/atuin";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia-official-plugins = {
url = "github:noctalia-dev/official-plugins";
flake = false;
};
noctalia-community-plugins = {
url = "github:noctalia-dev/community-plugins";
flake = false;
};
};
nixConfig = {
extra-substituters = [
"https://attic.xuyh0120.win/lantian"
"https://cache.iog.io"
"https://cache.nixos.org"
"https://comfyui.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://gipphe.cachix.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://nix-gaming.cachix.org"
"https://nixpkgs-unfree.cachix.org"
"https://noctalia.cachix.org"
"https://tweag-tricorder.cachix.org"
];
extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"comfyui.cachix.org-1:33mf9VzoIjzVbp0zwj+fT51HG0y31ZTK3nzYZAX0rec="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"gipphe.cachix.org-1:GeHkB5yyMQkXYCPJ1FqFl8fbtDe6/aSmS9k8c57GetY="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
"noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="
"tweag-tricorder.cachix.org-1:PbwYPJ9gF8Wns14ai0sHK3iblqFd5YUrj0zEzGsJ/wg="
];
};
}