Problem
NUR supports selecting a package entry point below a repository root via the file field, for example:
{
"repos": {
"example": {
"url": "https://github.com/example/dotfiles",
"file": "nixos/pkgs/nur.nix"
}
}
}
This controls evaluation, but NUR still fetches the entire Git repository. For monorepos such as dotfiles repositories, that can pull unrelated configuration, history, and large files even though only one package subtree is needed.
Proposed solution
Add an optional manifest field such as dir / subdirectory that limits the fetched checkout to a repository-relative directory (for example through Git sparse checkout, where supported). NUR could then evaluate default.nix within that directory, or resolve file relative to it.
Example:
{
"repos": {
"example": {
"url": "https://github.com/example/dotfiles",
"dir": "nixos/pkgs",
"file": "nur.nix"
}
}
}
If sparse checkout is not feasible for the current fetch/update implementation, documenting that file changes only the evaluation entry point—not the fetched repository—and recommending a dedicated package repository would still make this constraint clearer.
Related: #133
Problem
NUR supports selecting a package entry point below a repository root via the
filefield, for example:{ "repos": { "example": { "url": "https://github.com/example/dotfiles", "file": "nixos/pkgs/nur.nix" } } }This controls evaluation, but NUR still fetches the entire Git repository. For monorepos such as dotfiles repositories, that can pull unrelated configuration, history, and large files even though only one package subtree is needed.
Proposed solution
Add an optional manifest field such as
dir/subdirectorythat limits the fetched checkout to a repository-relative directory (for example through Git sparse checkout, where supported). NUR could then evaluatedefault.nixwithin that directory, or resolvefilerelative to it.Example:
{ "repos": { "example": { "url": "https://github.com/example/dotfiles", "dir": "nixos/pkgs", "file": "nur.nix" } } }If sparse checkout is not feasible for the current fetch/update implementation, documenting that
filechanges only the evaluation entry point—not the fetched repository—and recommending a dedicated package repository would still make this constraint clearer.Related: #133