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 ];
9 trusted-public-keys = [
10 "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
11 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
12 ];
13 cores = 0;
14 max-jobs = 2;
15 netrc-file = "/home/thehedgehog/.netrc";
16 };
17 description = "PyroNet machines and services";
18
19 inputs = {
20 flake-parts = {
21 url = "github:hercules-ci/flake-parts";
22 };
23 nixpkgs.url = "https://nixpkgs.dev/channel/nixpkgs-unstable";
24 nixpkgs-stalwart-fix.url = "github:pyrox0/nixpkgs/fix/stalwart-module";
25 # Overrides
26 flake-compat.url = "github:edolstra/flake-compat";
27 flake-utils = {
28 url = "github:numtide/flake-utils";
29 };
30
31 # Inputs
32 agenix = {
33 url = "github:ryantm/agenix";
34 inputs = {
35 nixpkgs.follows = "nixpkgs";
36 home-manager.follows = "home-manager";
37 };
38 };
39 buildbot-nix = {
40 url = "github:nix-community/buildbot-nix";
41 inputs.nixpkgs.follows = "nixpkgs";
42 inputs.flake-parts.follows = "flake-parts";
43 inputs.treefmt-nix.follows = "";
44 };
45 caelestia = {
46 url = "github:caelestia-dots/shell";
47 inputs.nixpkgs.follows = "nixpkgs";
48 inputs.quickshell.follows = "quickshell";
49 };
50 ctp = {
51 url = "github:catppuccin/nix";
52 };
53 dms = {
54 url = "github:AvengeMedia/DankMaterialShell";
55 inputs.nixpkgs.follows = "nixpkgs";
56 };
57 # DMS Plugins
58 dms-wp-shuffler = {
59 url = "github:Daniel-42-z/dms-wallpaper-shuffler";
60 flake = false;
61 };
62 dms-power-usage = {
63 url = "github:Daniel-42-z/dms-power-usage";
64 flake = false;
65 };
66 dms-plugins = {
67 url = "github:AvengeMedia/dms-plugins";
68 flake = false;
69 };
70 easy-hosts.url = "github:tgirlcloud/easy-hosts";
71 golink = {
72 url = "github:tailscale/golink";
73 inputs.nixpkgs.follows = "nixpkgs";
74 };
75 hardware = {
76 url = "github:nixos/nixos-hardware";
77 };
78 home-manager = {
79 url = "github:nix-community/home-manager";
80 inputs.nixpkgs.follows = "nixpkgs";
81 };
82 nix-index-database = {
83 url = "github:Mic92/nix-index-database";
84 inputs.nixpkgs.follows = "nixpkgs";
85 };
86 my-pkgs = {
87 url = "git+https://git.pyrox.dev/pyrox/pkgs";
88 inputs.nixpkgs.follows = "nixpkgs";
89 };
90 quickshell = {
91 url = "github:quickshell-mirror/quickshell";
92 inputs.nixpkgs.follows = "nixpkgs";
93 };
94 tangled = {
95 url = "git+https://tangled.org/@tangled.org/core";
96 };
97 treefmt-nix = {
98 url = "github:numtide/treefmt-nix";
99 inputs.nixpkgs.follows = "nixpkgs";
100 };
101 };
102
103 outputs =
104 inputs:
105 inputs.flake-parts.lib.mkFlake { inherit inputs; } {
106 # Systems we want to build for
107 systems = [
108 "x86_64-linux"
109 ];
110
111 # Flake modules
112 imports = [
113 inputs.easy-hosts.flakeModule
114 inputs.home-manager.flakeModules.home-manager
115 inputs.treefmt-nix.flakeModule
116 ./packages
117 ./lib
118 ./overlays
119 ./devShells
120 ./nixosModules
121 ./homeModules
122 ./templates
123 ./hosts
124 ];
125
126 # # Flake attributes
127 # flake = {
128 #
129 # };
130
131 # Per-system stuff
132 perSystem =
133 {
134 system,
135 ...
136 }:
137 {
138 _module.args.pkgs = import inputs.nixpkgs {
139 inherit system;
140 overlays = [
141 inputs.self.overlays.openssh-fixperms
142 inputs.golink.overlays.default
143 ];
144 config = {
145 allowUnfree = true;
146 };
147 };
148 treefmt = {
149 programs = {
150 deadnix = {
151 enable = true;
152 no-underscore = true;
153 };
154 jsonfmt.enable = true;
155 jsonfmt.excludes = [ ".zed/settings.json" ];
156 just.enable = true;
157 keep-sorted.enable = true;
158 mdformat.enable = true;
159 mdformat.settings.wrap = 120;
160 nixf-diagnose.enable = true;
161 nixfmt.enable = true;
162 nixfmt.indent = 2;
163 nixfmt.width = 120;
164 shellcheck.enable = true;
165 statix.enable = true;
166 stylua.enable = true;
167 taplo.enable = true;
168 yamlfmt.enable = true;
169 };
170 };
171 };
172 # Enable debugging for nixd
173 debug = true;
174 };
175}