flake: introduce 'pkgs' overlay

Also make it the prime overlay instead of the extended 'lib'.

The reason for `pkgs` not being structured as an overlay, but simply
taking `pkgs` as an argument is to allow it to be used as a NUR package
set, if I wanted to.
This commit is contained in:
Bruno BELANYI 2021-04-19 17:16:19 +00:00
parent 15f0f95538
commit edb9c46106
2 changed files with 9 additions and 2 deletions

View file

@ -24,7 +24,11 @@
then self.rev
else throw "Refusing to build from a dirty Git tree!";
})
{ nixpkgs.overlays = [ nur.overlay self.overlay ]; }
{
nixpkgs.overlays = (lib.attrValues self.overlays) ++ [
nur.overlay
];
}
home-manager.nixosModules.home-manager
{
home-manager.users.ambroisie = import ./home;
@ -61,10 +65,11 @@
];
};
}) // {
overlay = self.overlays.lib;
overlay = self.overlays.pkgs;
overlays = {
lib = final: prev: { inherit lib; };
pkgs = final: prev: { ambroisie = import ./pkgs { pkgs = prev; }; };
};
nixosConfigurations = lib.mapAttrs buildHost {

2
pkgs/default.nix Normal file
View file

@ -0,0 +1,2 @@
{ pkgs }:
{ }