nix-infra/hosts.nix

138 lines
2.9 KiB
Nix
Raw Normal View History

2024-11-20 05:46:41 +01:00
{ nixpkgs, nixpkgs-unstable, ... }:
2024-11-20 05:46:39 +01:00
let
# Set of environment specific modules
2024-11-20 05:46:39 +01:00
environments = {
"proxmox" = [
./config/environments/proxmox-vm
];
2024-11-20 05:46:40 +01:00
"openstack" = [
./config/environments/openstack-vm
];
2024-11-20 05:46:39 +01:00
};
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
2024-11-20 05:46:39 +01:00
pkgs ? hostNixpkgs.legacyPackages.${system},
environment ? "",
2024-11-20 05:46:39 +01:00
site
}: {
inherit hostNixpkgs system pkgs environment site;
# define common and host modules and additionally add environment specific modules
2024-11-20 05:46:39 +01:00
modules = [
./config/common
./config/hosts/${name}
] ++ (if environment != "" then environments.${environment} else []);
2024-11-20 05:46:39 +01:00
}) hosts;
in
generateDefaults {
2024-11-20 05:46:41 +01:00
gameserver-node-1 = {
site = "vs";
environment = "proxmox";
};
2024-11-20 05:46:39 +01:00
hydra = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
iperf = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
2024-11-20 05:46:39 +01:00
jellyfin = {
site = "vs";
environment = "proxmox";
};
2024-11-20 05:46:40 +01:00
jellyseerr = {
site = "vs";
environment = "proxmox";
};
2024-11-20 05:46:41 +01:00
forgejo = {
site = "vs";
environment = "proxmox";
};
2024-11-20 05:46:40 +01:00
keycloak = {
site = "vs";
environment = "proxmox";
};
lifeline = {
site = "io";
};
mail-1 = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
2024-11-20 05:46:40 +01:00
mail-2 = {
site = "wg";
environment = "proxmox";
2024-11-20 05:46:40 +01:00
};
mastodon = {
hostNixpkgs = nixpkgs-unstable;
2024-11-20 05:46:40 +01:00
site = "vs";
environment = "proxmox";
2024-11-20 05:46:40 +01:00
};
2024-11-20 05:46:40 +01:00
matrix = {
2024-11-20 05:46:41 +01:00
hostNixpkgs = nixpkgs-unstable;
2024-11-20 05:46:40 +01:00
site = "vs";
environment = "proxmox";
2024-11-20 05:46:40 +01:00
};
2024-11-20 05:46:40 +01:00
metrics = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:40 +01:00
};
2024-11-20 05:46:40 +01:00
navidrome = {
hostNixpkgs = nixpkgs-unstable;
site = "wg";
environment = "proxmox";
};
2024-11-20 05:46:40 +01:00
netbox = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:40 +01:00
};
2024-11-20 05:46:39 +01:00
nextcloud = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
2024-11-20 05:46:39 +01:00
nitter = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
paperless = {
site = "wg";
environment = "proxmox";
};
coturn = {
2024-11-20 05:46:39 +01:00
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
2024-11-20 05:46:40 +01:00
searx = {
hostNixpkgs = nixpkgs-unstable;
site = "vs";
environment = "proxmox";
};
torrent = {
site = "vs";
environment = "proxmox";
};
2024-11-20 05:46:39 +01:00
tor-relay = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
2024-11-20 05:46:40 +01:00
valkyrie = {
site = "af";
environment = "openstack";
};
web-public-1 = {
site = "wg";
environment = "proxmox";
};
2024-11-20 05:46:39 +01:00
web-public-2 = {
site = "vs";
environment = "proxmox";
2024-11-20 05:46:39 +01:00
};
web-nonpublic-linuxcrewd = {
hostNixpkgs = nixpkgs-unstable;
site = "vs";
environment = "proxmox";
};
2024-11-20 05:46:39 +01:00
}