2020-06-07 14:03:12 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2020-04-30 04:49:19 +00:00
|
|
|
{ depot, lib, pkgs, ... }@args:
|
|
|
|
let
|
|
|
|
inherit (builtins) foldl' mapAttrs;
|
2020-05-08 22:26:21 +00:00
|
|
|
baseModule = name: { ... }: {
|
|
|
|
_module.args = args // {
|
|
|
|
rebuilder = rebuilder name;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
systemFor = systemName: config:
|
|
|
|
(depot.third_party.nixeval {
|
|
|
|
system = builtins.currentSystem;
|
|
|
|
modules = [ (baseModule systemName) (args: { imports = [ lib/common.nix config ]; }) ];
|
|
|
|
}).config.system.build.toplevel;
|
2020-05-05 23:28:23 +00:00
|
|
|
systems = [ "porcorosso" "ixvm-fra01" "marukuru" "clouvider-fra01" ];
|
2020-05-09 10:14:25 +00:00
|
|
|
rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; }));
|
2020-04-30 04:49:19 +00:00
|
|
|
systemCfgs = lib.genAttrs systems
|
2020-05-08 22:26:21 +00:00
|
|
|
(name: import (./. + "/${name}"));
|
|
|
|
systemDrvs = mapAttrs systemFor systemCfgs;
|
2020-06-07 14:03:12 +00:00
|
|
|
in systemDrvs
|