Generate colmena and hydraJobs outputs from the same hosts attribute set
This commit is contained in:
parent
5856edeb47
commit
59a7e36838
3 changed files with 15 additions and 6 deletions
|
@ -1,23 +1,27 @@
|
|||
{ nixpkgs, nixpkgs-unstable, ... }:
|
||||
let
|
||||
# Set of environment specific modules
|
||||
environments = {
|
||||
"proxmox" = [
|
||||
./configuration/proxmox-vm
|
||||
./configuration/proxmox-vm/hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
#
|
||||
generateDefaults = hosts: builtins.mapAttrs (name: {
|
||||
hostNixpkgs ? nixpkgs,
|
||||
system ? "x86_64-linux",
|
||||
# pkgs is explicitly defined so that overlays for each host can easily be created
|
||||
pkgs ? hostNixpkgs.legacyPackages.${system},
|
||||
environment ? "proxmox",
|
||||
site
|
||||
}: {
|
||||
inherit hostNixpkgs system pkgs environment site;
|
||||
# define common and host modules and additionally add environment specific modules
|
||||
modules = [
|
||||
./configuration/common
|
||||
./hosts/${name}
|
||||
] ++ (if environments ? ${environment} then environments.${environment} else []);
|
||||
] ++ environments.${environment};
|
||||
}) hosts;
|
||||
in
|
||||
generateDefaults {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue