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 nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi/main";
43 };
44
45 outputs =
46 {
47 self,
48 nixpkgs,
49 home-manager,
50 catppuccin,
51 niri,
52 nixarr,
53 copyparty,
54 nixos-hardware,
55 agenix,
56 nixos-raspberrypi,
57 ...
58 }@inputs:
59 {
60 nixosConfigurations = {
61 # Replace "nixos" with your actual desired hostname if it's different
62 # This "nixos" must match the `networking.hostName` in your configuration.nix
63 mira = nixpkgs.lib.nixosSystem {
64 system = "x86_64-linux";
65 modules = [
66 # Your main configuration file
67 ./hosts/mira/configuration.nix
68 catppuccin.nixosModules.catppuccin
69 agenix.nixosModules.default
70
71 copyparty.nixosModules.default
72
73 ({
74 nixpkgs.overlays = [
75 niri.overlays.niri
76 copyparty.overlays.default
77 ];
78 })
79
80 # nixarr module
81 nixarr.nixosModules.default
82
83 # Home Manager module
84 home-manager.nixosModules.home-manager
85 {
86 home-manager.extraSpecialArgs = { inherit inputs; };
87 home-manager.users.sean = import ./hosts/mira/home.nix;
88 }
89 ];
90 specialArgs = { inherit inputs; };
91 };
92 framework16 = nixpkgs.lib.nixosSystem {
93 system = "x86_64-linux";
94 modules = [
95 # Your main configuration file
96 ./hosts/framework16/configuration.nix
97 catppuccin.nixosModules.catppuccin
98 nixos-hardware.nixosModules.framework-16-7040-amd
99
100 ({
101 nixpkgs.overlays = [ niri.overlays.niri ];
102 })
103
104 # Home Manager module
105 home-manager.nixosModules.home-manager
106 {
107 home-manager.extraSpecialArgs = { inherit inputs; };
108 home-manager.users.sean = import ./hosts/framework16/home.nix;
109 }
110 ];
111 specialArgs = { inherit inputs; };
112 };
113
114 pi = nixpkgs.lib.nixosSystem {
115 system = "aarch64-linux";
116 modules = [
117 "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
118 nixos-hardware.nixosModules.raspberry-pi-4
119 agenix.nixosModules.default
120 ./hosts/pi/configuration.nix
121
122 # Allow missing kernel modules (Pi kernel doesn't have all x86 modules)
123 # See: https://github.com/NixOS/nixpkgs/issues/154163
124 ({
125 nixpkgs.overlays = [
126 (final: super: {
127 makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
128 })
129 ];
130 })
131 ];
132 specialArgs = { inherit inputs; };
133 };
134
135 pizero = nixpkgs.lib.nixosSystem {
136 system = "aarch64-linux";
137 modules = [
138 "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
139 agenix.nixosModules.default
140 ./hosts/pizero/configuration.nix
141
142 # Allow missing kernel modules (Pi kernel doesn't have all x86 modules)
143 ({
144 nixpkgs.overlays = [
145 (final: super: {
146 makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
147 })
148 ];
149 })
150 ];
151 specialArgs = { inherit inputs; };
152 };
153
154 # organelle = nixpkgs.lib.nixosSystem {
155 # system = "aarch64-linux";
156 # modules = [
157 # "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
158 # agenix.nixosModules.default
159 # ./hosts/organelle/configuration.nix
160 #
161 # ({
162 # nixpkgs.overlays = [
163 # (final: super: {
164 # makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
165 # })
166 # ];
167 # })
168 # ];
169 # specialArgs = { inherit inputs; };
170 # };
171
172 kodi-pi = nixos-raspberrypi.lib.nixosSystemFull {
173 specialArgs = { inherit nixos-raspberrypi inputs; };
174 modules = [
175 (
176 { nixos-raspberrypi, ... }:
177 {
178 imports = with nixos-raspberrypi.nixosModules; [
179 raspberry-pi-5.base
180 raspberry-pi-5.page-size-16k
181 raspberry-pi-5.display-vc4
182 ];
183 }
184 )
185 # Disable SDL3 test suite (testprocess fails in Nix sandbox)
186 (
187 { pkgs, ... }:
188 {
189 nixpkgs.overlays = [
190 (final: prev: {
191 sdl3 = prev.sdl3.overrideAttrs (old: {
192 doCheck = false;
193 });
194 })
195 ];
196 }
197 )
198 agenix.nixosModules.default
199 ./hosts/kodi-pi/configuration.nix
200 ];
201 };
202 };
203 };
204}