|
9 | 9 | ref = "nixos-25.11"; |
10 | 10 | }; |
11 | 11 |
|
| 12 | + nixpkgs-unstable = { |
| 13 | + type = "github"; |
| 14 | + owner = "nixos"; |
| 15 | + repo = "nixpkgs"; |
| 16 | + ref = "nixos-unstable"; |
| 17 | + }; |
| 18 | + |
12 | 19 | systems = { |
13 | 20 | type = "github"; |
14 | 21 | owner = "nix-systems"; |
|
120 | 127 | { |
121 | 128 | self, |
122 | 129 | nixpkgs, |
| 130 | + nixpkgs-unstable, |
123 | 131 | systems, |
124 | 132 | colmena, |
125 | 133 | agenix, |
|
160 | 168 | disko.nixosModules.disko |
161 | 169 | niks3.nixosModules.default |
162 | 170 | niks3.nixosModules.niks3-auto-upload |
| 171 | + wayout.nixosModules.default |
163 | 172 | ]; |
164 | 173 |
|
165 | 174 | defaultSystem = "x86_64-linux"; |
|
199 | 208 | }; |
200 | 209 | }; |
201 | 210 |
|
| 211 | + pkgsUnstableFor = |
| 212 | + system: |
| 213 | + import nixpkgs-unstable { |
| 214 | + inherit system; |
| 215 | + }; |
| 216 | + |
202 | 217 | forAllSystems = fn: nixpkgs.lib.genAttrs (import systems) (system: fn (pkgsFor system)); |
203 | 218 |
|
204 | 219 | readGroup = |
|
239 | 254 | meta = { |
240 | 255 | nixpkgs = pkgsFor defaultSystem; |
241 | 256 | nodeNixpkgs = nixpkgs.lib.mapAttrs (name: pkgsFor) overrideSystem; |
242 | | - specialArgs = { inherit self inputs; }; |
| 257 | + specialArgs = { |
| 258 | + inherit self inputs; |
| 259 | + # pkgs-unstable exposes the packages from the nixpkgs-unstable input |
| 260 | + # this should only be used as a *temporary* measure when the version of |
| 261 | + # a package in nixpkgs stable is not sufficiently updated |
| 262 | + pkgs-unstable = pkgsUnstableFor defaultSystem; |
| 263 | + }; |
| 264 | + nodeSpecialArgs = nixpkgs.lib.mapAttrs (name: value: { |
| 265 | + pkgs-unstable = pkgsUnstableFor value; |
| 266 | + }) overrideSystem; |
243 | 267 | }; |
244 | 268 | } |
245 | 269 | ); |
|
276 | 300 | }; |
277 | 301 |
|
278 | 302 | overlays.default = final: prev: { |
| 303 | + # Patch nginx for multiple CVEs disclosed 2026-05-13, until nixos-25.11 |
| 304 | + # channel advances past the fix (nixpkgs#520076). |
| 305 | + # Remove this overlay once flake.lock points to a nixpkgs with nginx >= 1.30.1. |
| 306 | + nginx = prev.nginx.overrideAttrs (old: { |
| 307 | + patches = (old.patches or [ ]) ++ [ |
| 308 | + (final.fetchpatch { |
| 309 | + name = "CVE-2026-40460.patch"; |
| 310 | + url = "https://github.com/nginx/nginx/commit/f37ec3e5d4f527e52ed5b25951ad8aa7d1ff6266.patch"; |
| 311 | + hash = "sha256-++hYEzMUkl3mbBMaffR2LQTYMxOR/YziNkYCVyhw2Qg="; |
| 312 | + }) |
| 313 | + (final.fetchpatch { |
| 314 | + name = "CVE-2026-40701.patch"; |
| 315 | + url = "https://github.com/nginx/nginx/commit/71841dcedfdf46048ef5e25413fdf97a66957913.patch"; |
| 316 | + hash = "sha256-FzNZpEwIj76r5dpqEP6TgpSc1ywcW7ZOEQpFpwI/YZw="; |
| 317 | + }) |
| 318 | + (final.fetchpatch { |
| 319 | + name = "CVE-2026-42934.patch"; |
| 320 | + url = "https://github.com/nginx/nginx/commit/696a7f1b9198d576e6a59c1655b746fbf06561cf.patch"; |
| 321 | + hash = "sha256-/vjyEGysPv5VK4TZmk/gtIg9Zc5ogUXMwpBfBwe55Bc="; |
| 322 | + }) |
| 323 | + (final.fetchpatch { |
| 324 | + name = "CVE-2026-42945.patch"; |
| 325 | + url = "https://github.com/nginx/nginx/commit/2046b45aa0c6e712c216b9075886f3f26e9b4ca9.patch"; |
| 326 | + hash = "sha256-VK9CXgrCIqORsaRivTZBmkoLyQhbZ07ss6nAbLNvfJM="; |
| 327 | + }) |
| 328 | + (final.fetchpatch { |
| 329 | + name = "CVE-2026-42946.patch"; |
| 330 | + url = "https://github.com/nginx/nginx/commit/baef7fdac28e4e1fe26509b50b8d15603393e28e.patch"; |
| 331 | + hash = "sha256-Z1naMxxiVuDbUcvX3PiIK4CMuSSpUyzPqjix9GTwHmk="; |
| 332 | + }) |
| 333 | + (final.fetchpatch { |
| 334 | + name = "CVE-2026-42946-part-2.patch"; |
| 335 | + url = "https://github.com/nginx/nginx/commit/39d7d0ba0799fcff6baee52b6525f45739593cfd.patch"; |
| 336 | + hash = "sha256-6PwV0iz4kQGGBwVk9129aH+TFzbSx3QSVpp22AoKQY4="; |
| 337 | + }) |
| 338 | + ]; |
| 339 | + }); |
| 340 | + |
279 | 341 | ocf-utils = ocf-utils.packages.${final.stdenv.hostPlatform.system}.default; |
280 | | - ocf-wayout = wayout.packages.${final.stdenv.hostPlatform.system}.default; |
281 | 342 | ocf-jukebox = ocf-jukebox.packages.${final.stdenv.hostPlatform.system}.default; |
282 | 343 | plasma-applet-commandoutput = final.callPackage ./pkgs/plasma-applet-commandoutput.nix { }; |
283 | 344 | catppuccin-sddm = final.qt6Packages.callPackage ./pkgs/catppuccin-sddm.nix { }; |
284 | 345 | ocf-cosmic-applets = ocf-cosmic-applets.packages.${final.stdenv.hostPlatform.system}.default; |
285 | 346 | ocf-cosmic-greeter = final.callPackage ./pkgs/ocf-cosmic-greeter.nix { }; |
286 | 347 | ocf-hplip = final.callPackage ./pkgs/ocf-hplip.nix { }; |
| 348 | + ocf-niks3-push = final.callPackage ./pkgs/ocf-niks3-push { |
| 349 | + niks3 = niks3.packages.${final.stdenv.hostPlatform.system}.default; |
| 350 | + }; |
287 | 351 | }; |
288 | 352 |
|
289 | 353 | agenix-rekey = agenix-rekey.configure { |
|
318 | 382 |
|
319 | 383 | nixosConfigurations = builtins.mapAttrs ( |
320 | 384 | host: colmenaConfig: |
321 | | - nixpkgs.lib.nixosSystem rec { |
| 385 | + let |
322 | 386 | system = overrideSystem.${host} or defaultSystem; |
| 387 | + in |
| 388 | + nixpkgs.lib.nixosSystem { |
| 389 | + inherit system; |
323 | 390 | pkgs = pkgsFor system; |
324 | 391 | modules = colmenaConfig.imports; |
325 | | - specialArgs = { inherit inputs; }; |
| 392 | + specialArgs = { |
| 393 | + inherit inputs; |
| 394 | + pkgs-unstable = pkgsUnstableFor system; |
| 395 | + }; |
326 | 396 | } |
327 | 397 | ) colmenaHosts; |
328 | 398 | }; |
|
0 commit comments