From 73ea02b982fc68d69759ec193219000fd1279caa Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 7 Sep 2024 23:05:03 +0200 Subject: [PATCH] feat(modules/nixpkgs): introduce source parameter Signed-off-by: Raito Bezarius --- modules/nixpkgs.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix index 15c9c0c..206d506 100644 --- a/modules/nixpkgs.nix +++ b/modules/nixpkgs.nix @@ -83,11 +83,11 @@ let localSystem = cfg.hostPlatform; }; in - import ({ + import cfg.source ({ inherit (cfg) config overlays; } // systemArgs) else - import { + 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 = ; + defaultText = ""; + }; pkgs = mkOption { defaultText = literalExpression ''