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