diff --git a/flake.nix b/flake.nix index 8ef865e..0d928c1 100644 --- a/flake.nix +++ b/flake.nix @@ -89,10 +89,20 @@ defaultText = lib.literalExpression "true"; example = lib.literalExpression "false"; }; + + setNixpkgsFlakeAlias = lib.mkOption { + description = "Set nix path entry for `nixpkgs` to self"; + type = lib.types.bool; + default = true; + defaultText = lib.literalExpression "true"; + example = lib.literalExpression "false"; + }; }; - config.nix.registry = lib.mkIf config.dragnpkgs.setFlakeRegistry { - dragnpkgs-unstable = self.meta.registry-entry; + config.nix.registry.dragnpkgs-unstable = lib.mkIf config.dragnpkgs.setFlakeRegistry self.meta.registry-entry; + config.nix.registry.nixpkgs = lib.mkIf config.dragnpkgs.setNixpkgsFlakeAlias { + from = { id = "nixpkgs"; type = "indirect"; }; + to = { id = "dragnpkgs-unstable"; type = "indirect"; }; }; config.nix.nixPath = lib.mkIf config.dragnpkgs.setNixPath [