m 2 deployment: add graphs
This commit is contained in:
parent
79f36f6408
commit
16b8fef4f5
37
makefu/2configs/deployment/graphs.nix
Normal file
37
makefu/2configs/deployment/graphs.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with import <stockholm/lib>;
|
||||
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.bepasty.servers."paste.r".nginx.extraConfig = ''
|
||||
if ( $server_addr = "${external-ip}" ) {
|
||||
return 403;
|
||||
}
|
||||
'';
|
||||
krebs.tinc_graphs = {
|
||||
enable = true;
|
||||
nginx = {
|
||||
enable = true;
|
||||
# TODO: remove hard-coded hostname
|
||||
complete = {
|
||||
extraConfig = ''
|
||||
if ( $server_addr = "${external-ip}" ) {
|
||||
return 403;
|
||||
}
|
||||
'';
|
||||
serverAliases = [
|
||||
"graphs.r" "graphs.retiolum"
|
||||
"graphs.${hn}" "graphs.${hn}.retiolum"
|
||||
];
|
||||
};
|
||||
anonymous = {
|
||||
enableSSL = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue