1{
2 nixConfig = {
3 experimental-features = "nix-command flakes";
4 substitute = "true";
5 extra-substituters = [
6 "https://cache.nixos.org"
7 "https://nix-community.cachix.org"
8 "https://install.determinate.systems"
9 ];
10 trusted-public-keys = [
11 "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
12 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
13 "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM="
14 ];
15 cores = 0;
16 max-jobs = 2;
17 netrc-file = "/home/thehedgehog/.netrc";
18 };
19 description = "PyroNet machines and services";
20
21 inputs = {
22 flake-parts = {
23 url = "github:hercules-ci/flake-parts";
24 inputs.nixpkgs-lib.follows = "nixpkgs-lib";
25 };
26 nixpkgs.url = "https://nixpkgs.dev/channel/nixpkgs-unstable";
27 nixpkgs-stalwart-fix.url = "github:pyrox0/nixpkgs/fix/stalwart-module";
28 stable.url = "github:nixos/nixpkgs/nixos-24.05";
29 # Overrides
30 flake-compat.url = "github:edolstra/flake-compat";
31 systems.url = "github:nix-systems/default";
32 flake-utils = {
33 url = "github:numtide/flake-utils";
34 inputs.systems.follows = "systems";
35 };
36 nixpkgs-lib.url = "github:nix-community/nixpkgs.lib";
37
38 # Inputs
39 agenix = {
40 url = "github:ryantm/agenix";
41 inputs = {
42 nixpkgs.follows = "nixpkgs";
43 systems.follows = "systems";
44 home-manager.follows = "home-manager";
45 };
46 };
47 buildbot-nix = {
48 url = "github:nix-community/buildbot-nix";
49 inputs.nixpkgs.follows = "nixpkgs";
50 inputs.flake-parts.follows = "flake-parts";
51 inputs.treefmt-nix.follows = "";
52 };
53 ctp = {
54 url = "github:catppuccin/nix";
55 };
56 dix = {
57 url = "https://flakehub.com/f/DeterminateSystems/nix-src/*";
58 inputs = {
59 nixpkgs.follows = "nixpkgs";
60 nixpkgs-regression.follows = "";
61 nixpkgs-23-11.follows = "";
62
63 flake-parts.follows = "";
64 git-hooks-nix.follows = "";
65 };
66 };
67 determinate = {
68 url = "github:DeterminateSystems/determinate";
69 inputs = {
70 nixpkgs.follows = "nixpkgs";
71 nix.follows = "dix";
72 };
73 };
74 dns = {
75 url = "github:nix-community/dns.nix";
76 inputs.flake-utils.follows = "flake-utils";
77 inputs.nixpkgs.follows = "nixpkgs";
78 };
79 easy-hosts.url = "github:tgirlcloud/easy-hosts";
80 golink = {
81 url = "github:tailscale/golink";
82 inputs.systems.follows = "systems";
83 inputs.nixpkgs.follows = "nixpkgs";
84 };
85 hardware = {
86 url = "github:nixos/nixos-hardware";
87 };
88 home-manager = {
89 url = "github:nix-community/home-manager";
90 inputs.nixpkgs.follows = "nixpkgs";
91 };
92 iceshrimp = {
93 url = "git+https://iceshrimp.dev/pyrox/packaging";
94 inputs.nixpkgs.follows = "nixpkgs";
95 };
96 mailserver = {
97 url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master";
98 inputs = {
99 flake-compat.follows = "flake-compat";
100 nixpkgs.follows = "nixpkgs";
101 };
102 };
103 nix-search = {
104 url = "github:diamondburned/nix-search";
105 inputs.nixpkgs.follows = "nixpkgs";
106 inputs.flake-utils.follows = "flake-utils";
107 inputs.flake-compat.follows = "flake-compat";
108 };
109 nix-index = {
110 url = "github:nix-community/nix-index";
111 inputs.flake-compat.follows = "flake-compat";
112 inputs.nixpkgs.follows = "nixpkgs";
113 };
114 nix-index-database = {
115 url = "github:Mic92/nix-index-database";
116 inputs.nixpkgs.follows = "nixpkgs";
117 };
118 my-pkgs = {
119 url = "git+https://git.pyrox.dev/pyrox/pkgs";
120 inputs.nixpkgs.follows = "nixpkgs";
121 };
122 tangled = {
123 url = "git+https://tangled.org/@tangled.org/core";
124 };
125 };
126
127 outputs =
128 inputs:
129 inputs.flake-parts.lib.mkFlake { inherit inputs; } {
130 # Systems we want to build for
131 systems = [
132 "x86_64-linux"
133 ];
134
135 # Flake modules
136 imports = [
137 inputs.easy-hosts.flakeModule
138 inputs.home-manager.flakeModules.home-manager
139 ./packages
140 ./lib
141 ./overlays
142 ./devShells
143 ./nixosModules
144 ./homeModules
145 ./templates
146 ./hosts
147 ];
148
149 # # Flake attributes
150 # flake = {
151 #
152 # };
153
154 # Per-system stuff
155 perSystem =
156 {
157 pkgs,
158 system,
159 ...
160 }:
161 {
162 _module.args.pkgs = import inputs.nixpkgs {
163 inherit system;
164 overlays = [
165 # inputs.self.overlays.pyronet-packages
166 inputs.self.overlays.openssh-fixperms
167 inputs.golink.overlays.default
168 ];
169 config = {
170 allowUnfree = true;
171 };
172 };
173 formatter = pkgs.nixfmt;
174 };
175 };
176}