nix-infra/hosts.nix

51 lines
1.1 KiB
Nix

{ 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}
] ++ environments.${environment};
}) hosts;
in
generateDefaults {
hydra = {
hostNixpkgs = nixpkgs-unstable;
site = "vs";
};
iperf = {
site = "vs";
};
jackett = {
site = "vs";
};
nitter = {
site = "vs";
};
nixos-coturn = {
site = "vs";
};
tor-relay = {
site = "vs";
};
web-public-2 = {
hostNixpkgs = nixpkgs-unstable;
site = "vs";
};
}