My custom repository of my nixpkgs
that I plan to either upstream to nixpkgs
or keep here as they don't make sense to share.
It follows the regular conventions of nixpkgs
(specially following the conventions defined in their named based package directories).
You can add my pkgs
repository as a regular flake input:
{
inputs = {
mynixpkgs = {
url = "github:aldoborrero/mypkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
And use it as a regular flake input to access it's packages as a regular flake input or add them to your nixpkgs
as an overlay:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/23.11";
mynixpkgs = {
url = "github:aldoborrero/mynixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { self, mynixpkgs, nixpkgs, ... }: let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
# add packages via the default overlay
mynixpkgs.overlays.default
];
};
in {
nixosConfigurations.my-system = nixpkgs.lib.nixosSystem {
inherit system pkgs;
modules = [
# optional: add nixos modules via the default nixosModule
mynixpkgs.nixosModules.default
];
};
};
}
Thanks to flake-compat
you can also use this repository without flakes! Make sure you import it with:
$ niv add aldoborrero/mypkgs
And add the overlay to your nixpkgs
import with niv
:
{system ? builtins.currentSystem}: let
sources = import ./sources.nix;
# overlays
mynixpkgs = import sources.mynixpkgs;
in
import sources.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays =
[
mynixpkgs.overlays.default
];
}
See License for more information.