depot/ops/nixos/default.nix

19 lines
708 B
Nix

{ depot, lib, pkgs, ... }@args:
let
inherit (builtins) foldl' mapAttrs;
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;
systems = [ "porcorosso" "ixvm-fra01" "marukuru" "clouvider-fra01" ];
rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; }));
systemCfgs = lib.genAttrs systems
(name: import (./. + "/${name}"));
systemDrvs = mapAttrs systemFor systemCfgs;
in systemDrvs