Are there any 3rd party repos for NixOS? It seems some people overlay one package, but I cannot find entire packagesets such as the one in Nixpkgs. Are channels used for that? Would I be able to have my own repo with several packages? Can I have more than 1 repo in my Nix system, and set which package install each program from?
Yes, the most common one I think is the NUR, the Nix User Repository, the packages have their own namespace. https://github.com/nix-community/NUR
Would it be possible, for propietary software compiled directly for NixOS, to have a binary-only (as opposed to source, or binary+patched) repository? Everything I see is either source+cache or binary+patched, but nothing like binary especifically for NixOS.
I don't see anything prohibiting that
Let’s say I want to add some extra, propietary codecs unavailable to NixOS. How would I be able to change a dependency so that each package dependent on it automatically picked it? Could I switch a dependency for a certain repo from one of another, different repo?
The issue is that packages (or derivations) only depend on something because it's declared in their definition. That means if you need to add dependencies to existing packages, that can be done via overrideAttrs
. However, I'm not certain that you can easily add attributes to functions that don't have a mechanism for it (I don't know derivations that allow for more attributes than specified and I'm not very good at the nix language) and dependencies (buildInputs
and nativeBuildInputs
) can only use packages that were supplied as attributes. Derivations usually declare their attributes via { x, y ? "bar" }:
, what you would need to make use of additional attributes is something like attrs @ { x, y ? "bar", ... }:
so that the additionally supplied attributes can be accessed. But again am not an expert in the language so take that with a grain of salt.