2019-08-15 17:07:28 +02:00
|
|
|
# This file sets up the top-level package set by merging all local packages into
|
|
|
|
# the nixpkgs top-level.
|
|
|
|
#
|
|
|
|
# This makes packages accessible via the Nixery instance that is configured to
|
|
|
|
# use this repository as its nixpkgs source.
|
2019-06-29 15:12:24 +02:00
|
|
|
|
2019-08-19 03:28:03 +02:00
|
|
|
with builtins;
|
|
|
|
|
2019-06-29 15:12:24 +02:00
|
|
|
let
|
2019-08-25 18:54:17 +02:00
|
|
|
# The pinned commit here is identical to the public nixery.dev
|
|
|
|
# version, since popularity data has been generated for that.
|
2019-10-25 10:03:52 +02:00
|
|
|
stableCommit = "80b42e630b23052d9525840a9742100a2ceaaa8f";
|
2019-08-25 18:54:17 +02:00
|
|
|
stableSrc = fetchTarball {
|
|
|
|
url = "https://github.com/NixOS/nixpkgs-channels/archive/${stableCommit}.tar.gz";
|
2019-10-25 10:03:52 +02:00
|
|
|
sha256 = "0243qiivxl3z51biy4f5y5cy81x5bki5dazl9wqwgnmd373gpmxy";
|
2019-08-25 18:54:17 +02:00
|
|
|
};
|
2019-11-15 16:26:08 +01:00
|
|
|
readTree = import ./read-tree.nix;
|
2019-08-25 18:54:17 +02:00
|
|
|
|
2019-11-16 00:25:41 +01:00
|
|
|
# Derivations that have `meta.enableCI` set to `true` should be
|
|
|
|
# built by the CI system on every commit. This code implements
|
|
|
|
# filtering of all derivations in the local sets against this
|
|
|
|
# condition.
|
|
|
|
filterCI = lib: pkgs: let
|
|
|
|
inherit (lib) collect isDerivation filterAttrsRecursive;
|
|
|
|
ciCondition = _: x: (!isDerivation x) || ((x ? meta.enableCI) && (x.meta.enableCI));
|
|
|
|
in collect isDerivation (filterAttrsRecursive ciCondition pkgs);
|
|
|
|
|
|
|
|
repoPkgs = self: super:
|
2019-11-15 16:26:08 +01:00
|
|
|
let config = {
|
|
|
|
pkgs = self;
|
|
|
|
upstream = super;
|
2019-09-03 16:56:31 +02:00
|
|
|
|
2019-11-15 16:26:08 +01:00
|
|
|
kms = {
|
2019-09-03 16:56:31 +02:00
|
|
|
project = "tazjins-infrastructure";
|
|
|
|
region = "europe-north1";
|
|
|
|
keyring = "tazjins-keys";
|
|
|
|
key = "kontemplate-key";
|
|
|
|
};
|
2019-08-16 17:50:50 +02:00
|
|
|
};
|
2019-11-15 16:26:08 +01:00
|
|
|
in {
|
|
|
|
services = readTree ./services config;
|
|
|
|
tools = readTree ./tools config;
|
|
|
|
third_party = readTree ./third_party config;
|
2019-11-16 00:25:41 +01:00
|
|
|
}
|
|
|
|
# Load overrides into the top-level:
|
|
|
|
// (readTree ./overrides config)
|
|
|
|
# Collect all projects that should be built by CI
|
|
|
|
// {
|
|
|
|
ciProjects = (filterCI super.lib self.services)
|
|
|
|
++ (filterCI super.lib self.tools)
|
|
|
|
++ (filterCI super.lib self.third_party);
|
|
|
|
};
|
2019-08-25 18:54:17 +02:00
|
|
|
in { ... } @ args: import stableSrc (args // {
|
2019-11-16 00:25:41 +01:00
|
|
|
overlays = [ repoPkgs ];
|
2019-08-15 17:07:28 +02:00
|
|
|
config.allowUnfree = true;
|
2019-10-26 12:10:21 +02:00
|
|
|
config.allowBroken = true;
|
2019-07-04 12:15:59 +02:00
|
|
|
})
|