|
|
|
@ -1,14 +1,4 @@
|
|
|
|
|
{ config, inputs, pkgs, ... }:
|
|
|
|
|
let
|
|
|
|
|
bmpPort = 11019;
|
|
|
|
|
kyouma-www = inputs.kyouma-www.packages.${config.nixpkgs.hostPlatform.system};
|
|
|
|
|
autoIndex = ''
|
|
|
|
|
autoindex on;
|
|
|
|
|
autoindex_exact_size off;
|
|
|
|
|
autoindex_format html;
|
|
|
|
|
autoindex_localtime on;
|
|
|
|
|
'';
|
|
|
|
|
in {
|
|
|
|
|
{ config, inputs, pkgs, ... }: {
|
|
|
|
|
imports = [
|
|
|
|
|
inputs.fernglas.nixosModules.default
|
|
|
|
|
inputs.kyouma-www.nixosModules.default
|
|
|
|
@ -20,9 +10,8 @@ in {
|
|
|
|
|
];
|
|
|
|
|
networking = {
|
|
|
|
|
hostName = "web-dus";
|
|
|
|
|
# docker
|
|
|
|
|
nftables.enable = mkForce false;
|
|
|
|
|
firewall.allowedTCPPorts = [ 80 443 bmpPort ];
|
|
|
|
|
firewall.allowedTCPPorts = [ 80 443 11019 ];
|
|
|
|
|
firewall.allowedUDPPorts = [ 443 ];
|
|
|
|
|
};
|
|
|
|
|
systemd.network.networks."98-eth-default" = {
|
|
|
|
@ -48,7 +37,7 @@ in {
|
|
|
|
|
collectors = {
|
|
|
|
|
bmp_collector = {
|
|
|
|
|
collector_type = "Bmp";
|
|
|
|
|
bind = "[::]:${toString bmpPort}";
|
|
|
|
|
bind = "[::]:11019";
|
|
|
|
|
peers = {
|
|
|
|
|
"45.150.123.0" = {};
|
|
|
|
|
};
|
|
|
|
@ -56,8 +45,15 @@ in {
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
services.nginx = {
|
|
|
|
|
createHost = {
|
|
|
|
|
kyouma.nginx.virtualHosts = let
|
|
|
|
|
kyouma-www = inputs.kyouma-www.packages.${config.nixpkgs.hostPlatform.system};
|
|
|
|
|
autoIndex = ''
|
|
|
|
|
autoindex on;
|
|
|
|
|
autoindex_exact_size off;
|
|
|
|
|
autoindex_format html;
|
|
|
|
|
autoindex_localtime on;
|
|
|
|
|
'';
|
|
|
|
|
in {
|
|
|
|
|
"miau.zip" = { root = kyouma-www.default; };
|
|
|
|
|
"www.miau.zip" = { redirectTo = "miau.zip"; };
|
|
|
|
|
"www.kyouma.net" = { redirectTo = "kyouma.net"; };
|
|
|
|
@ -107,7 +103,6 @@ in {
|
|
|
|
|
locations."/api/".proxyPass = "http://${config.services.fernglas.settings.api.bind}";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
security.acme.certs = {
|
|
|
|
|
"miau.zip" = { extraDomainNames = [ "www.miau.zip" "lg.miau.zip" ]; };
|
|
|
|
|
"kyouma.net" = { extraDomainNames = [ "www.kyouma.net" "lg.kyouma.net" ]; };
|
|
|
|
|