2023-12-04 23:33:15 +01:00
|
|
|
{ nixpkgs, nixpkgs-unstable, nixpkgs-23-05, ... }:
|
2023-07-30 01:38:31 +02:00
|
|
|
let
|
2023-07-31 15:03:52 +02:00
|
|
|
# Set of environment specific modules
|
2023-07-30 01:38:31 +02:00
|
|
|
environments = {
|
|
|
|
"proxmox" = [
|
2023-09-14 14:43:49 +02:00
|
|
|
./config/environments/proxmox-vm
|
|
|
|
];
|
2023-09-16 20:05:33 +02:00
|
|
|
"openstack" = [
|
|
|
|
./config/environments/openstack-vm
|
|
|
|
];
|
2023-07-30 01:38:31 +02:00
|
|
|
};
|
|
|
|
generateDefaults = hosts: builtins.mapAttrs (name: {
|
|
|
|
hostNixpkgs ? nixpkgs,
|
|
|
|
system ? "x86_64-linux",
|
2023-07-31 15:03:52 +02:00
|
|
|
# pkgs is explicitly defined so that overlays for each host can easily be created
|
2023-07-30 01:38:31 +02:00
|
|
|
pkgs ? hostNixpkgs.legacyPackages.${system},
|
2023-09-14 14:43:49 +02:00
|
|
|
environment ? "",
|
2023-07-30 01:38:31 +02:00
|
|
|
site
|
|
|
|
}: {
|
|
|
|
inherit hostNixpkgs system pkgs environment site;
|
2023-07-31 15:03:52 +02:00
|
|
|
# define common and host modules and additionally add environment specific modules
|
2023-07-30 01:38:31 +02:00
|
|
|
modules = [
|
2023-09-14 14:43:49 +02:00
|
|
|
./config/common
|
|
|
|
./config/hosts/${name}
|
|
|
|
] ++ (if environment != "" then environments.${environment} else []);
|
2023-07-30 01:38:31 +02:00
|
|
|
}) hosts;
|
|
|
|
in
|
|
|
|
generateDefaults {
|
2023-09-14 14:43:49 +02:00
|
|
|
#fee = {
|
|
|
|
# site = "wg";
|
|
|
|
#};
|
2023-07-30 01:38:31 +02:00
|
|
|
hydra = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-07-30 01:38:31 +02:00
|
|
|
};
|
|
|
|
iperf = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-07-30 01:38:31 +02:00
|
|
|
};
|
2023-08-01 23:02:11 +02:00
|
|
|
jellyfin = {
|
2023-08-02 22:46:07 +02:00
|
|
|
hostNixpkgs = nixpkgs-unstable;
|
2023-08-01 23:02:11 +02:00
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
|
|
|
};
|
|
|
|
lifeline = {
|
|
|
|
site = "io";
|
|
|
|
};
|
|
|
|
mail-1 = {
|
2023-12-04 23:33:15 +01:00
|
|
|
hostNixpkgs = nixpkgs-23-05;
|
2023-09-14 14:43:49 +02:00
|
|
|
site = "vs";
|
|
|
|
environment = "proxmox";
|
2023-08-01 23:02:11 +02:00
|
|
|
};
|
2023-09-18 03:38:09 +02:00
|
|
|
mail-2 = {
|
2023-12-04 23:33:15 +01:00
|
|
|
hostNixpkgs = nixpkgs-23-05;
|
2023-09-18 03:38:09 +02:00
|
|
|
site = "wg";
|
|
|
|
environment = "proxmox";
|
2023-10-10 04:14:29 +02:00
|
|
|
};
|
|
|
|
mastodon = {
|
|
|
|
site = "vs";
|
|
|
|
environment = "proxmox";
|
2023-09-18 03:38:09 +02:00
|
|
|
};
|
2023-08-29 16:10:22 +02:00
|
|
|
matrix = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-08-29 16:10:22 +02:00
|
|
|
};
|
2023-08-06 17:53:50 +02:00
|
|
|
metrics = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-08-06 17:53:50 +02:00
|
|
|
};
|
2023-11-26 00:19:00 +01:00
|
|
|
navidrome = {
|
|
|
|
hostNixpkgs = nixpkgs-unstable;
|
|
|
|
site = "wg";
|
|
|
|
environment = "proxmox";
|
|
|
|
};
|
2023-08-05 04:47:14 +02:00
|
|
|
netbox = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-08-05 04:47:14 +02:00
|
|
|
};
|
2023-08-03 15:51:21 +02:00
|
|
|
nextcloud = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-08-03 15:51:21 +02:00
|
|
|
};
|
2023-07-30 01:38:31 +02:00
|
|
|
nitter = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-07-30 01:38:31 +02:00
|
|
|
};
|
2023-09-25 01:35:11 +02:00
|
|
|
paperless = {
|
|
|
|
site = "wg";
|
|
|
|
environment = "proxmox";
|
|
|
|
};
|
2023-08-07 22:12:36 +02:00
|
|
|
coturn = {
|
2023-07-30 01:38:31 +02:00
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-07-30 01:38:31 +02:00
|
|
|
};
|
2023-10-16 11:22:48 +02:00
|
|
|
searx = {
|
|
|
|
hostNixpkgs = nixpkgs-unstable;
|
|
|
|
site = "vs";
|
|
|
|
environment = "proxmox";
|
|
|
|
};
|
2023-12-16 00:22:34 +01:00
|
|
|
torrent = {
|
|
|
|
site = "vs";
|
|
|
|
environment = "proxmox";
|
|
|
|
};
|
2023-07-30 01:38:31 +02:00
|
|
|
tor-relay = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-07-30 01:38:31 +02:00
|
|
|
};
|
2023-09-16 20:05:33 +02:00
|
|
|
valkyrie = {
|
2023-12-05 04:15:32 +01:00
|
|
|
hostNixpkgs = nixpkgs-23-05;
|
2023-09-16 20:05:33 +02:00
|
|
|
site = "af";
|
|
|
|
environment = "openstack";
|
|
|
|
};
|
2023-09-25 01:35:11 +02:00
|
|
|
web-public-1 = {
|
|
|
|
site = "wg";
|
|
|
|
environment = "proxmox";
|
|
|
|
};
|
2023-07-30 01:38:31 +02:00
|
|
|
web-public-2 = {
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-07-30 01:38:31 +02:00
|
|
|
};
|
2023-08-02 22:46:07 +02:00
|
|
|
web-nonpublic-linuxcrewd = {
|
|
|
|
hostNixpkgs = nixpkgs-unstable;
|
|
|
|
site = "vs";
|
2023-09-14 14:43:49 +02:00
|
|
|
environment = "proxmox";
|
2023-08-02 22:46:07 +02:00
|
|
|
};
|
2023-07-30 01:38:31 +02:00
|
|
|
}
|