nixos-config/2configs/deployment/graphs.nix

32 lines
698 B
Nix
Raw Normal View History

2017-04-11 21:35:49 +02:00
{ config, lib, pkgs, ... }:
with pkgs.stockholm.lib;
2017-04-11 21:35:49 +02:00
let
external-ip = config.krebs.build.host.nets.internet.ip4.addr;
internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
hn = config.krebs.build.host.name;
in {
krebs.tinc_graphs = {
enable = true;
nginx = {
enable = true;
# TODO: remove hard-coded hostname
complete = {
extraConfig = ''
if ( $server_addr = "${external-ip}" ) {
return 403;
}
'';
serverAliases = [
2021-11-30 22:00:34 +01:00
"graph.makefu.r"
2017-04-15 17:58:20 +02:00
"graph.${hn}" "graph.${hn}.r"
2017-04-11 21:35:49 +02:00
];
};
anonymous = {
forceSSL = true;
enableACME = true;
};
};
};
}