forked from hacc/haccfiles
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
let
|
|
hosts = {
|
|
hainich = {
|
|
ssh.host = "hainich.hacc.space";
|
|
groups = [ "server" "hacc" ];
|
|
};
|
|
nixda = {
|
|
ssh.host = "nixda.hacc.space";
|
|
groups = [ "server" "desktop" "hacc" "live" ];
|
|
};
|
|
"cdn/node-2" = {
|
|
ssh.host = "cdn-node-2.live.hacc.media";
|
|
groups = [ "server" "hacc" "live" "livecdn" "livecdn-node" ];
|
|
};
|
|
"cdn/node-1" = {
|
|
ssh.host = "cdn-node-1.live.hacc.media";
|
|
groups = [ "server" "hacc" "live" "livecdn" "livecdn-node" ];
|
|
};
|
|
"cdn/master" = {
|
|
ssh.host = "cdn-master.live.hacc.media";
|
|
groups = [ "server" "hacc" "live" "livecdn" "livecdn-master" ];
|
|
};
|
|
"cdn/loadbalancer" = {
|
|
ssh.host = "cdn-loadbalancer.live.hacc.media";
|
|
groups = [ "server" "hacc" "live" "livecdn" "livecdn-lb" ];
|
|
};
|
|
};
|
|
pkgs = import <nixpkgs> {};
|
|
evalConfig = import <nixpkgs/nixos/lib/eval-config.nix>;
|
|
lib = pkgs.lib;
|
|
in lib.mapAttrs (name: host: host // {
|
|
config = if (host ? config) then host.config else (evalConfig {
|
|
modules = [
|
|
(import "${toString ./.}/${name}/configuration.nix")
|
|
];
|
|
}).config;
|
|
}) hosts
|