40 lines
922 B
Nix
40 lines
922 B
Nix
# Our bare-metal hydra is a server in the nomad cluster, it is not a
|
|
# client and therefore does not run cluster jobs
|
|
{ zentralwerk, config, pkgs, ... }:
|
|
let
|
|
inherit (config.networking) hostName;
|
|
ipv6Addr = zentralwerk.lib.config.site.net.serv.hosts6.dn42.${hostName};
|
|
in
|
|
{
|
|
services.nomad = {
|
|
enable = true;
|
|
enableDocker = false;
|
|
|
|
settings = {
|
|
datacenter = "c3d2";
|
|
plugin.raw_exec.config.enabled = true;
|
|
|
|
addresses = {
|
|
http = "::1";
|
|
rpc = ipv6Addr;
|
|
serf = ipv6Addr;
|
|
};
|
|
server = {
|
|
enabled = true;
|
|
bootstrap_expect = 3;
|
|
};
|
|
server_join = {
|
|
retry_join = map (server:
|
|
zentralwerk.lib.config.site.net.cluster.hosts4.${server}
|
|
) [ "server9" "server10" ];
|
|
};
|
|
|
|
client = {
|
|
enabled = true;
|
|
network_interface = "cluster";
|
|
servers = [ "localhost" ];
|
|
};
|
|
};
|
|
};
|
|
}
|