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 };
25 nixpkgs.url = "https://nixpkgs.dev/channel/nixpkgs-unstable";
26 nixpkgs-stalwart-fix.url = "github:pyrox0/nixpkgs/fix/stalwart-module";
27 # Overrides
28 flake-compat.url = "github:edolstra/flake-compat";
29 flake-utils = {
30 url = "github:numtide/flake-utils";
31 };
32
33 # Inputs
34 agenix = {
35 url = "github:ryantm/agenix";
36 inputs = {
37 nixpkgs.follows = "nixpkgs";
38 home-manager.follows = "home-manager";
39 };
40 };
41 buildbot-nix = {
42 url = "github:nix-community/buildbot-nix";
43 inputs.nixpkgs.follows = "nixpkgs";
44 inputs.flake-parts.follows = "flake-parts";
45 inputs.treefmt-nix.follows = "";
46 };
47 caelestia = {
48 url = "github:caelestia-dots/shell";
49 inputs.nixpkgs.follows = "nixpkgs";
50 };
51 ctp = {
52 url = "github:catppuccin/nix";
53 };
54 dix = {
55 url = "https://flakehub.com/f/DeterminateSystems/nix-src/*";
56 inputs = {
57 nixpkgs.follows = "nixpkgs";
58 nixpkgs-regression.follows = "";
59 nixpkgs-23-11.follows = "";
60
61 flake-parts.follows = "";
62 git-hooks-nix.follows = "";
63 };
64 };
65 determinate = {
66 url = "github:DeterminateSystems/determinate";
67 inputs = {
68 nixpkgs.follows = "nixpkgs";
69 nix.follows = "dix";
70 };
71 };
72 easy-hosts.url = "github:tgirlcloud/easy-hosts";
73 golink = {
74 url = "github:tailscale/golink";
75 inputs.nixpkgs.follows = "nixpkgs";
76 };
77 hardware = {
78 url = "github:nixos/nixos-hardware";
79 };
80 home-manager = {
81 url = "github:nix-community/home-manager";
82 inputs.nixpkgs.follows = "nixpkgs";
83 };
84 nix-index-database = {
85 url = "github:Mic92/nix-index-database";
86 inputs.nixpkgs.follows = "nixpkgs";
87 };
88 my-pkgs = {
89 url = "git+https://git.pyrox.dev/pyrox/pkgs";
90 inputs.nixpkgs.follows = "nixpkgs";
91 };
92 tangled = {
93 url = "git+https://tangled.org/@tangled.org/core";
94 };
95 };
96
97 outputs =
98 inputs:
99 inputs.flake-parts.lib.mkFlake { inherit inputs; } {
100 # Systems we want to build for
101 systems = [
102 "x86_64-linux"
103 ];
104
105 # Flake modules
106 imports = [
107 inputs.easy-hosts.flakeModule
108 inputs.home-manager.flakeModules.home-manager
109 ./packages
110 ./lib
111 ./overlays
112 ./devShells
113 ./nixosModules
114 ./homeModules
115 ./templates
116 ./hosts
117 ];
118
119 # # Flake attributes
120 # flake = {
121 #
122 # };
123
124 # Per-system stuff
125 perSystem =
126 {
127 pkgs,
128 system,
129 ...
130 }:
131 {
132 _module.args.pkgs = import inputs.nixpkgs {
133 inherit system;
134 overlays = [
135 # inputs.self.overlays.pyronet-packages
136 inputs.self.overlays.openssh-fixperms
137 inputs.golink.overlays.default
138 ];
139 config = {
140 allowUnfree = true;
141 };
142 };
143 formatter = pkgs.nixfmt;
144 };
145 # Enable debugging for nixd
146 debug = true;
147 };
148}