me like nix
1{
2 description = "My NixOS Flake Configuration";
3
4 inputs = {
5 # Nixpkgs (stable or unstable)
6 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7
8 # Home Manager
9 home-manager = {
10 url = "github:nix-community/home-manager/master";
11 inputs.nixpkgs.follows = "nixpkgs"; # Ensures Home Manager uses the same nixpkgs
12 };
13 catppuccin.url = "github:catppuccin/nix";
14 niri.url = "github:sodiboo/niri-flake";
15 nixarr.url = "github:rasmus-kirk/nixarr";
16 zen-browser = {
17 url = "github:0xc000022070/zen-browser-flake";
18 inputs.nixpkgs.follows = "nixpkgs";
19 };
20 copyparty.url = "github:9001/copyparty";
21 nixos-hardware.url = "github:NixOS/nixos-hardware/master";
22 agenix = {
23 url = "github:ryantm/agenix";
24 inputs.nixpkgs.follows = "nixpkgs";
25 };
26 kaleidux = {
27 url = "github:Mjoyufull/Kaleidux/feat/zerocopy";
28 inputs.nixpkgs.follows = "nixpkgs";
29 };
30 fsel = {
31 url = "github:Mjoyufull/fsel";
32 inputs.nixpkgs.follows = "nixpkgs";
33 };
34 # organelle-hello = {
35 # url = "path:/home/sean/dev/organelle-hello";
36 # inputs.nixpkgs.follows = "nixpkgs";
37 # };
38 trmnl-rs = {
39 url = "github:seanaye/trmnl-rs";
40 inputs.nixpkgs.follows = "nixpkgs";
41 };
42 berkeley-mono = {
43 url = "github:seanaye/berkeley-mono";
44 inputs.nixpkgs.follows = "nixpkgs";
45 };
46 mako-tui = {
47 url = "git+https://codeberg.org/seanaye/mako-tui";
48 inputs.nixpkgs.follows = "nixpkgs";
49 };
50 nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi/main";
51 };
52
53 outputs =
54 {
55 self,
56 nixpkgs,
57 home-manager,
58 catppuccin,
59 niri,
60 nixarr,
61 copyparty,
62 nixos-hardware,
63 agenix,
64 nixos-raspberrypi,
65 ...
66 }@inputs:
67 {
68 nixosConfigurations = {
69 # Replace "nixos" with your actual desired hostname if it's different
70 # This "nixos" must match the `networking.hostName` in your configuration.nix
71 mira = nixpkgs.lib.nixosSystem {
72 system = "x86_64-linux";
73 modules = [
74 # Your main configuration file
75 ./hosts/mira/configuration.nix
76 catppuccin.nixosModules.catppuccin
77 agenix.nixosModules.default
78
79 copyparty.nixosModules.default
80
81 ({
82 nixpkgs.overlays = [
83 niri.overlays.niri
84 copyparty.overlays.default
85 ];
86 })
87
88 # nixarr module
89 nixarr.nixosModules.default
90
91 # Home Manager module
92 home-manager.nixosModules.home-manager
93 {
94 home-manager.extraSpecialArgs = { inherit inputs; };
95 home-manager.users.sean = import ./hosts/mira/home.nix;
96 }
97 ];
98 specialArgs = { inherit inputs; };
99 };
100 framework16 = nixpkgs.lib.nixosSystem {
101 system = "x86_64-linux";
102 modules = [
103 # Your main configuration file
104 ./hosts/framework16/configuration.nix
105 catppuccin.nixosModules.catppuccin
106 nixos-hardware.nixosModules.framework-16-7040-amd
107
108 ({
109 nixpkgs.overlays = [ niri.overlays.niri ];
110 })
111
112 # Home Manager module
113 home-manager.nixosModules.home-manager
114 {
115 home-manager.extraSpecialArgs = { inherit inputs; };
116 home-manager.users.sean = import ./hosts/framework16/home.nix;
117 }
118 ];
119 specialArgs = { inherit inputs; };
120 };
121
122 pi = nixpkgs.lib.nixosSystem {
123 system = "aarch64-linux";
124 modules = [
125 "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
126 nixos-hardware.nixosModules.raspberry-pi-4
127 agenix.nixosModules.default
128 ./hosts/pi/configuration.nix
129
130 # Allow missing kernel modules (Pi kernel doesn't have all x86 modules)
131 # See: https://github.com/NixOS/nixpkgs/issues/154163
132 ({
133 nixpkgs.overlays = [
134 (final: super: {
135 makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
136 })
137 ];
138 })
139 ];
140 specialArgs = { inherit inputs; };
141 };
142
143 pizero = nixpkgs.lib.nixosSystem {
144 system = "aarch64-linux";
145 modules = [
146 "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
147 agenix.nixosModules.default
148 ./hosts/pizero/configuration.nix
149
150 # Allow missing kernel modules (Pi kernel doesn't have all x86 modules)
151 ({
152 nixpkgs.overlays = [
153 (final: super: {
154 makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
155 })
156 ];
157 })
158 ];
159 specialArgs = { inherit inputs; };
160 };
161
162 # organelle = nixpkgs.lib.nixosSystem {
163 # system = "aarch64-linux";
164 # modules = [
165 # "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
166 # agenix.nixosModules.default
167 # ./hosts/organelle/configuration.nix
168 #
169 # ({
170 # nixpkgs.overlays = [
171 # (final: super: {
172 # makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
173 # })
174 # ];
175 # })
176 # ];
177 # specialArgs = { inherit inputs; };
178 # };
179
180 kodi-pi = nixos-raspberrypi.lib.nixosSystemFull {
181 specialArgs = { inherit nixos-raspberrypi inputs; };
182 modules = [
183 (
184 { nixos-raspberrypi, ... }:
185 {
186 imports = with nixos-raspberrypi.nixosModules; [
187 raspberry-pi-5.base
188 raspberry-pi-5.page-size-16k
189 raspberry-pi-5.display-vc4
190 ];
191 }
192 )
193 # Disable SDL3 test suite (testprocess fails in Nix sandbox)
194 (
195 { pkgs, ... }:
196 {
197 nixpkgs.overlays = [
198 (final: prev: {
199 sdl3 = prev.sdl3.overrideAttrs (old: {
200 doCheck = false;
201 });
202 })
203 ];
204 }
205 )
206 agenix.nixosModules.default
207 ./hosts/kodi-pi/configuration.nix
208 ];
209 };
210 };
211 };
212}