os/lib/devos/mkPkgs.nix
2021-04-18 20:04:19 -05:00

28 lines
689 B
Nix

{ lib, nixpkgs, userSelf, utils, userFlakeInputs, ... }:
{ extern, overrides }:
(utils.lib.eachDefaultSystem
(system:
let
overridePkgs = lib.os.pkgImport userFlakeInputs.override [ ] system;
overridesOverlay = overrides.packages;
overlays = [
(final: prev: {
lib = prev.lib.extend (lfinal: lprev: {
inherit lib;
inherit (lib) nixosSystem;
utils = inputs.utils.lib;
});
})
(overridesOverlay overridePkgs)
userSelf.overlay
]
++ extern.overlays
++ (lib.attrValues userSelf.overlays);
in
{ pkgs = lib.os.pkgImport nixpkgs overlays system; }
)
).pkgs