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