From 39c34ce0f146bbb2e45bb5a03db31acbd5ed27f1 Mon Sep 17 00:00:00 2001 From: josie Date: Wed, 20 May 2026 16:04:13 +0200 Subject: [PATCH] fix: read pkgs.frigate in module default so overlays compose The services.frigate.package default was a direct callPackage of pkgs/frigate/package.nix, bypassing the package set. That meant overlays.default (which adds frigate to nixpkgs) had no effect on actual deployments, and consumer-side overlays on pkgs.frigate were also silently ineffective. The only override path that actually reached the module was services.frigate.package = ..., which forced consumers wanting a custom build (overlay, version pin, batching experiments) into per-host module edits. Read pkgs.frigate instead, falling back to the original callPackage if no overlay defines it. The three standard Nix override paths now all compose: - nixpkgs.overlays = [ roost.overlays.default ] (or any equivalent) - services.frigate.package = - a downstream fork of pkgs/frigate/package.nix Strictly additive: callers not applying any overlay get the same package as before. --- modules/frigate.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/frigate.nix b/modules/frigate.nix index 596d3fd..de0376e 100644 --- a/modules/frigate.nix +++ b/modules/frigate.nix @@ -84,9 +84,16 @@ in package = mkOption { type = types.package; - default = pkgs.callPackage ../pkgs/frigate/package.nix { }; - defaultText = literalExpression "pkgs.callPackage \"\${roost}/pkgs/frigate/package.nix\" { }"; - description = "Frigate package to use."; + default = pkgs.frigate or (pkgs.callPackage ../pkgs/frigate/package.nix { }); + defaultText = literalExpression "pkgs.frigate or (pkgs.callPackage \"\${roost}/pkgs/frigate/package.nix\" { })"; + description = '' + Frigate package to use. Defaults to `pkgs.frigate` if defined + (e.g. via `roost.overlays.default` or a consumer overlay), + otherwise to a fresh callPackage of `pkgs/frigate/package.nix` + from this flake — so the standard Nix override paths + (overlay, this option, or a downstream package fork) all + compose. + ''; }; user = mkOption {