Skip to content

Commit 80816f9

Browse files
committed
refactor(flake): co-locate inputs with their flake modules
- Move `nix-lib-net`, `yants`, `contracts`, `infuse`, `alloc` to `modules/flake/lib-custom/` - Move `agenix`, `ragenix`, `agenix-rekey` to `modules/flake/agenix/` - Move `home-manager`, `nix-on-droid`, `dnshack`, `nix-darwin`, `mac-app-util`, `deploy-rs`, `openwrt-imagebuilder` to `modules/flake/configurations/` - Move `dream2nix` to `modules/flake/packages/` - Move `neovim-nightly-overlay`, `zig-overlay`, `zls-overlay`, `wired` to `modules/flake/pkgs/`
1 parent ae144f1 commit 80816f9

6 files changed

Lines changed: 137 additions & 127 deletions

File tree

modules/flake/agenix/default.nix

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@
33
{
44
key = "rix101.modules.flake.agenix";
55

6+
flake-file.inputs = {
7+
agenix = {
8+
url = "github:ryantm/agenix";
9+
inputs = {
10+
nixpkgs.follows = "nixpkgs";
11+
darwin.follows = "nix-darwin";
12+
home-manager.follows = "home-manager";
13+
systems.follows = "systems";
14+
};
15+
};
16+
17+
ragenix = {
18+
url = "github:yaxitech/ragenix";
19+
inputs.crane.follows = "crane";
20+
inputs.agenix.follows = "agenix";
21+
inputs.nixpkgs.follows = "nixpkgs";
22+
inputs.flake-utils.inputs.systems.follows = "systems";
23+
};
24+
25+
agenix-rekey = {
26+
url = "github:oddlama/agenix-rekey";
27+
inputs.nixpkgs.follows = "nixpkgs";
28+
inputs.flake-parts.follows = "flake-parts";
29+
};
30+
};
31+
632
imports = [
733
../lib
834
inputs.agenix-rekey.flakeModules.default

modules/flake/configurations/default.nix

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,57 @@
33
{
44
key = "rix101.modules.flake.configurations";
55

6+
config.flake-file.inputs = {
7+
# Home Manager
8+
home-manager = {
9+
url = "github:nix-community/home-manager";
10+
inputs.nixpkgs.follows = "nixpkgs";
11+
};
12+
13+
# Nix on Droid
14+
nix-on-droid = {
15+
url = "github:t184256/nix-on-droid";
16+
# url = "github:t184256/nix-on-droid/master";
17+
inputs.nixpkgs.follows = "nixpkgs";
18+
inputs.home-manager.follows = "home-manager";
19+
};
20+
dnshack = {
21+
url = "github:ettom/dnshack";
22+
flake = false;
23+
};
24+
25+
# Nix Darwin
26+
nix-darwin = {
27+
url = "github:lnl7/nix-darwin/master";
28+
inputs.nixpkgs.follows = "nixpkgs";
29+
};
30+
31+
mac-app-util = {
32+
url = "github:hraban/mac-app-util";
33+
inputs.nixpkgs.follows = "nixpkgs";
34+
inputs.systems.follows = "systems";
35+
# WARN: needs `nix` `2.30`+
36+
inputs.cl-nix-lite.inputs.systems.follows = "systems";
37+
inputs.cl-nix-lite.inputs.nixpkgs.follows = "nixpkgs";
38+
inputs.cl-nix-lite.inputs.flake-parts.follows = "flake-parts";
39+
inputs.cl-nix-lite.inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
40+
inputs.flake-utils.inputs.systems.follows = "systems";
41+
};
42+
43+
deploy-rs = {
44+
url = "github:serokell/deploy-rs";
45+
inputs.nixpkgs.follows = "nixpkgs";
46+
inputs.utils.inputs.systems.follows = "systems";
47+
};
48+
49+
openwrt-imagebuilder = {
50+
url = "github:astro/nix-openwrt-imagebuilder";
51+
inputs.nixpkgs.follows = "nixpkgs";
52+
inputs.flake-parts.follows = "flake-parts";
53+
inputs.systems.follows = "systems";
54+
};
55+
};
56+
657
imports = [
758
../lib
859
../lib-custom

modules/flake/flake-file.nix

Lines changed: 0 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -58,57 +58,16 @@
5858
url = "github:vic/flake-file";
5959
};
6060

61-
dream2nix = {
62-
url = "github:nix-community/dream2nix";
63-
inputs.nixpkgs.follows = "nixpkgs";
64-
};
65-
6661
crane = {
6762
url = "github:ipetkov/crane";
6863
};
6964

70-
# Nix on Droid
71-
nix-on-droid = {
72-
url = "github:t184256/nix-on-droid";
73-
# url = "github:t184256/nix-on-droid/master";
74-
inputs.nixpkgs.follows = "nixpkgs";
75-
inputs.home-manager.follows = "home-manager";
76-
};
77-
dnshack = {
78-
url = "github:ettom/dnshack";
79-
flake = false;
80-
};
81-
82-
# Nix Darwin
83-
nix-darwin = {
84-
url = "github:lnl7/nix-darwin/master";
85-
inputs.nixpkgs.follows = "nixpkgs";
86-
};
87-
88-
mac-app-util = {
89-
url = "github:hraban/mac-app-util";
90-
inputs.nixpkgs.follows = "nixpkgs";
91-
inputs.systems.follows = "systems";
92-
# WARN: needs `nix` `2.30`+
93-
inputs.cl-nix-lite.inputs.systems.follows = "systems";
94-
inputs.cl-nix-lite.inputs.nixpkgs.follows = "nixpkgs";
95-
inputs.cl-nix-lite.inputs.flake-parts.follows = "flake-parts";
96-
inputs.cl-nix-lite.inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
97-
inputs.flake-utils.inputs.systems.follows = "systems";
98-
};
99-
10065
yknotify-rs = {
10166
url = "github:reo101/yknotify-rs";
10267
inputs.nixpkgs.follows = "nixpkgs";
10368
inputs.flake-parts.follows = "flake-parts";
10469
};
10570

106-
# Home Manager
107-
home-manager = {
108-
url = "github:nix-community/home-manager";
109-
inputs.nixpkgs.follows = "nixpkgs";
110-
};
111-
11271
flake-compat = {
11372
url = "github:inclyc/flake-compat";
11473
flake = false;
@@ -120,31 +79,6 @@
12079
inputs.home-manager.follows = "home-manager";
12180
};
12281

123-
nix-lib-net = {
124-
url = "github:reo101/nix-lib-net";
125-
};
126-
127-
yants = {
128-
url = "git+https://code.tvl.fyi/depot.git:/nix/yants.git";
129-
flake = false;
130-
};
131-
132-
contracts = {
133-
url = "github:yvan-sraka/contracts";
134-
# WARN: is technically a flake, exposing the `default.nix` under `nixosModules.default`
135-
flake = false;
136-
};
137-
138-
infuse = {
139-
url = "git+https://codeberg.org/amjoseph/infuse.nix";
140-
flake = false;
141-
};
142-
143-
alloc = {
144-
url = "github:Aleksanaa/alloc.nix";
145-
flake = false;
146-
};
147-
14882
nix-monitored = {
14983
url = "github:ners/nix-monitored";
15084
inputs.nixpkgs.follows = "nixpkgs";
@@ -172,36 +106,6 @@
172106
inputs.nixpkgs.follows = "nixpkgs";
173107
};
174108

175-
deploy-rs = {
176-
url = "github:serokell/deploy-rs";
177-
inputs.nixpkgs.follows = "nixpkgs";
178-
inputs.utils.inputs.systems.follows = "systems";
179-
};
180-
181-
agenix = {
182-
url = "github:ryantm/agenix";
183-
inputs = {
184-
nixpkgs.follows = "nixpkgs";
185-
darwin.follows = "nix-darwin";
186-
home-manager.follows = "home-manager";
187-
systems.follows = "systems";
188-
};
189-
};
190-
191-
ragenix = {
192-
url = "github:yaxitech/ragenix";
193-
inputs.crane.follows = "crane";
194-
inputs.agenix.follows = "agenix";
195-
inputs.nixpkgs.follows = "nixpkgs";
196-
inputs.flake-utils.inputs.systems.follows = "systems";
197-
};
198-
199-
agenix-rekey = {
200-
url = "github:oddlama/agenix-rekey";
201-
inputs.nixpkgs.follows = "nixpkgs";
202-
inputs.flake-parts.follows = "flake-parts";
203-
};
204-
205109
# Nix User Repository
206110
nur = {
207111
url = "github:nix-community/NUR";
@@ -252,37 +156,6 @@
252156
url = "github:misterio77/nix-colors";
253157
};
254158

255-
neovim-nightly-overlay = {
256-
url = "github:nix-community/neovim-nightly-overlay";
257-
# inputs.nixpkgs.follows = "nixpkgs";
258-
inputs.flake-parts.follows = "flake-parts";
259-
};
260-
261-
zig-overlay = {
262-
url = "github:mitchellh/zig-overlay";
263-
inputs.nixpkgs.follows = "nixpkgs";
264-
inputs.systems.follows = "systems";
265-
};
266-
267-
zls-overlay = {
268-
url = "github:zigtools/zls";
269-
inputs.nixpkgs.follows = "nixpkgs";
270-
inputs.zig-overlay.follows = "zig-overlay";
271-
};
272-
273-
openwrt-imagebuilder = {
274-
url = "github:astro/nix-openwrt-imagebuilder";
275-
inputs.nixpkgs.follows = "nixpkgs";
276-
inputs.flake-parts.follows = "flake-parts";
277-
inputs.systems.follows = "systems";
278-
};
279-
280-
wired = {
281-
url = "github:Toqozz/wired-notify";
282-
inputs.nixpkgs.follows = "nixpkgs";
283-
inputs.flake-parts.follows = "flake-parts";
284-
};
285-
286159
microvm = {
287160
url = "github:astro/microvm.nix";
288161
inputs.nixpkgs.follows = "nixpkgs";

modules/flake/lib-custom/default.nix

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,33 @@
1313
../lib
1414
];
1515

16+
config.flake-file.inputs = {
17+
nix-lib-net = {
18+
url = "github:reo101/nix-lib-net";
19+
};
20+
21+
yants = {
22+
url = "git+https://code.tvl.fyi/depot.git:/nix/yants.git";
23+
flake = false;
24+
};
25+
26+
contracts = {
27+
url = "github:yvan-sraka/contracts";
28+
# WARN: is technically a flake, exposing the `default.nix` under `nixosModules.default`
29+
flake = false;
30+
};
31+
32+
infuse = {
33+
url = "git+https://codeberg.org/amjoseph/infuse.nix";
34+
flake = false;
35+
};
36+
37+
alloc = {
38+
url = "github:Aleksanaa/alloc.nix";
39+
flake = false;
40+
};
41+
};
42+
1643
config.lib-overlays = [
1744
inputs.nix-lib-net.overlays.raw
1845
# Yants

modules/flake/packages/default.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
{
44
key = "rix101.modules.flake.packages";
55

6+
config.flake-file.inputs = {
7+
dream2nix = {
8+
url = "github:nix-community/dream2nix";
9+
inputs.nixpkgs.follows = "nixpkgs";
10+
};
11+
};
12+
613
imports = [
714
../lib
815
../things

modules/flake/pkgs/default.nix

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
{ inputs, self, lib, config, ... }:
22

33
{
4+
flake-file.inputs = {
5+
neovim-nightly-overlay = {
6+
url = "github:nix-community/neovim-nightly-overlay";
7+
# inputs.nixpkgs.follows = "nixpkgs";
8+
inputs.flake-parts.follows = "flake-parts";
9+
};
10+
11+
zig-overlay = {
12+
url = "github:mitchellh/zig-overlay";
13+
inputs.nixpkgs.follows = "nixpkgs";
14+
inputs.systems.follows = "systems";
15+
};
16+
17+
zls-overlay = {
18+
url = "github:zigtools/zls";
19+
inputs.nixpkgs.follows = "nixpkgs";
20+
inputs.zig-overlay.follows = "zig-overlay";
21+
};
22+
23+
wired = {
24+
url = "github:Toqozz/wired-notify";
25+
inputs.nixpkgs.follows = "nixpkgs";
26+
inputs.flake-parts.follows = "flake-parts";
27+
};
28+
};
29+
430
imports = [
531
(
632
{ lib

0 commit comments

Comments
 (0)