2020-01-23 17:30:39 +01:00
|
|
|
# At the time of this writing, this configuration was taken from @tazjin's
|
|
|
|
# default.nix from his depot. I've added, changed, and removed that parts that I
|
|
|
|
# don't need, and this is what remains.
|
|
|
|
{ ... }@args:
|
|
|
|
|
|
|
|
with builtins;
|
|
|
|
|
|
|
|
let
|
|
|
|
fix = f: let x = f x; in x;
|
|
|
|
|
|
|
|
# Global configuration that all packages are called with.
|
2020-02-23 23:29:32 +01:00
|
|
|
config = self: {
|
|
|
|
inherit self;
|
|
|
|
pkgs = import <nixpkgs> {};
|
|
|
|
depot = import <depot> {};
|
|
|
|
briefcase = import <briefcase> {};
|
2020-01-23 17:30:39 +01:00
|
|
|
};
|
|
|
|
|
2020-02-23 23:29:32 +01:00
|
|
|
readTree' = import <depot/nix/readTree> {};
|
2020-01-23 17:30:39 +01:00
|
|
|
|
2020-01-23 22:58:31 +01:00
|
|
|
# TODO: Find a better way to expose entire monorepo without introducing
|
|
|
|
# "infinite recursion".
|
2020-01-23 17:30:39 +01:00
|
|
|
localPkgs = readTree: {
|
2020-02-23 23:32:38 +01:00
|
|
|
nixos = readTree ./nixos;
|
2020-01-23 22:58:31 +01:00
|
|
|
blog = readTree ./blog;
|
2020-01-24 11:50:05 +01:00
|
|
|
lisp = readTree ./lisp;
|
2020-02-09 14:47:48 +01:00
|
|
|
gopkgs = readTree ./gopkgs;
|
|
|
|
monzo_ynab = readTree ./monzo_ynab;
|
2020-01-23 22:58:31 +01:00
|
|
|
third_party = readTree ./third_party;
|
2020-02-12 17:58:29 +01:00
|
|
|
tools = readTree ./tools;
|
2020-01-23 17:30:39 +01:00
|
|
|
};
|
|
|
|
in fix(self: {
|
|
|
|
config = config self;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Add local packages as structured by readTree
|
|
|
|
// (localPkgs (readTree' (self.config // { inherit (self) lib; })))
|
|
|
|
)
|