final fixes for the day

This commit is contained in:
kat witch 2021-08-12 06:12:55 +01:00
parent 59f9bafd30
commit b0b2ed8fb0
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
4 changed files with 8 additions and 20 deletions

View file

@ -42,7 +42,9 @@ with lib;
domains = [ "kittywit.ch" "dork.dev" ];
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80.
certificateScheme = 3;
certificateScheme = 1;
certificateFile = "/var/lib/acme/${config.mailserver.fqdn}/cert.pem";
keyFile = "/var/lib/acme/${config.mailserver.fqdn}/key.pem";
# Enable IMAP and POP3
enableImap = true;

View file

@ -17,12 +17,12 @@ in
scrapeConfigs = [
{
job_name = "boline";
static_configs = [{ targets = [ "boline.${config.network.dns.ygg_prefix}.${config.network.dns.domain}:8002" ]; }];
static_configs = [{ targets = [ "boline.${config.network.addresses.yggdrasil.prefix}.${config.network.dns.domain}:8002" ]; }];
}
{
job_name = "samhain-vm";
metrics_path = "/metrics";
static_configs = [{ targets = [ "samhain.${config.network.dns.ygg_prefix}.${config.network.dns.domain}:10445" ]; }];
static_configs = [{ targets = [ "samhain.${config.network.addresses.yggdrasil.prefix}.${config.network.dns.domain}:10445" ]; }];
}
] ++ mapAttrsToList
(hostName: prom: {
@ -30,13 +30,13 @@ in
metrics_path = "/api/v1/allmetrics";
honor_labels = true;
params = { format = [ "prometheus" ]; };
static_configs = [{ targets = [ "${hostName}.${config.network.dns.ygg_prefix}.${config.network.dns.domain}:19999" ]; }];
static_configs = [{ targets = [ "${hostName}.${config.network.addresses.yggdrasil.prefix}.${config.network.dns.domain}:19999" ]; }];
})
nd_configs ++ mapAttrsToList
(hostName: prom: {
job_name = hostName;
static_configs = [{
targets = [ "${hostName}.${config.network.dns.ygg_prefix}.${config.network.dns.domain}:${toString prom.port}" ];
targets = [ "${hostName}.${config.network.addresses.yggdrasil.prefix}.${config.network.dns.domain}:${toString prom.port}" ];
}];
})
prom_configs;

View file

@ -80,7 +80,7 @@ let
kat-splash = self.callPackage ./kat-splash { };
kat-glauca-dns = self.callPackage ./kat-glauca-dns { };
kat-website = self.callPackage ./kat-website { };
kat-gpg-status = self.callPackage ./kat-gpg-status { };

View file

@ -1,14 +0,0 @@
{ pkgs, curl, coreutils, writeShellScriptBin }:
writeShellScriptBin "kat-glauca-dns" ''
#!/usr/bin/env bash
set -eu
ip4=$(${curl}/bin/curl -s --ipv4 https://dns.glauca.digital/checkip)
ip6=$(${curl}/bin/curl -s --ipv6 https://dns.glauca.digital/checkip)
source $passFile
echo "$ip4, $ip6"
${curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip4}" "https://dns.glauca.digital/nic/update"
echo ""
${curl}/bin/curl -u ''${user}:''${pass} --data-urlencode "hostname=''${hostname}" --data-urlencode "myip=''${ip6}" "https://dns.glauca.digital/nic/update"
''