Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@
};
in
{
# Overlay attribute is `frigate-sparrowwallet` rather than the plain
# `frigate` to avoid silently colliding with nixpkgs's unrelated
# `pkgs.frigate` (blakeblackshear/frigate, an NVR camera). The module
# reads this name; consumers wanting overlay-based overrides set
# `frigate-sparrowwallet` in their own overlay too.
overlays.default = final: _prev: {
frigate = final.callPackage ./pkgs/frigate/package.nix { };
frigate-sparrowwallet = final.callPackage ./pkgs/frigate/package.nix { };
};

packages = forAllSystems (
Expand All @@ -47,8 +52,8 @@
pkgs = pkgsFor system;
in
{
frigate = pkgs.frigate;
default = pkgs.frigate;
frigate = pkgs.frigate-sparrowwallet;
default = pkgs.frigate-sparrowwallet;

# frigate-bench: measure bitcoind RPC cost with frigate's actual
# call patterns and HTTP keep-alive (no fresh-curl-per-call TCP
Expand Down
22 changes: 14 additions & 8 deletions modules/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,21 @@ in

package = mkOption {
type = types.package;
default = pkgs.frigate or (pkgs.callPackage ../pkgs/frigate/package.nix { });
defaultText = literalExpression "pkgs.frigate or (pkgs.callPackage \"\${roost}/pkgs/frigate/package.nix\" { })";
default = pkgs.frigate-sparrowwallet or (pkgs.callPackage ../pkgs/frigate/package.nix { });
defaultText = literalExpression "pkgs.frigate-sparrowwallet 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.
Frigate package to use. Resolves to `pkgs.frigate-sparrowwallet`
when defined (e.g. via `roost.overlays.default` or a consumer
overlay), otherwise falls back to a fresh callPackage of
`pkgs/frigate/package.nix` from this flake. The non-standard
attribute name avoids a collision with nixpkgs's unrelated
`pkgs.frigate` (blakeblackshear/frigate, an NVR camera) — using
the plain `frigate` name would silently resolve to that
derivation for any consumer not applying roost's overlay.

All three standard override paths still compose: a consumer
overlay defining `pkgs.frigate-sparrowwallet`, this option, or
a downstream fork of `pkgs/frigate/package.nix`.
'';
};

Expand Down
Loading