feat(modules/nixpkgs): introduce source parameter

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
Raito Bezarius 2024-09-07 23:05:03 +02:00
parent c942b2be09
commit 73ea02b982

View file

@ -83,11 +83,11 @@ let
localSystem = cfg.hostPlatform;
};
in
import <nixpkgs> ({
import cfg.source ({
inherit (cfg) config overlays;
} // systemArgs)
else
import <nixpkgs> {
import cfg.source {
inherit (cfg) config overlays localSystem crossSystem;
};
@ -97,6 +97,14 @@ in
{
options.nixpkgs = {
source = mkOption {
type = types.package // {
description = "Source of a nixpkgs repository";
};
default = <nixpkgs>;
defaultText = "<nixpkgs>";
};
pkgs = mkOption {
defaultText = literalExpression ''