hercules-ci / flake-parts

❄️ Simplify Nix Flakes with the module system
https://flake.parts
MIT License
721 stars 41 forks source link

Explicitly pass default nixpkgs to mkFlake #174

Open avnik opened 1 year ago

avnik commented 1 year ago

Currently, mkFlake use input named nixpkgs as default source for pkgs. Would be nice to set this explicitly,

Example of desired code:

{
  inputs.nixpkgs = "github:nixos/nixpkgs/some-old-branch";
  inputs.nixpkgs-stable = "github:nixos/nixpkgs/nixos-23.05";
  inputs.flake-parts = "github:hercules-ci/flake-parts";
  outputs = inputs@{ flake-parts, nixpkgs-stable, ...}: flake-parts.lib.mkFlake { inherit inputs; nixpkgs = nixpkgs-stable; } { ...}
}