Completed the part with caddy. Problems with exporterr and api keys
This commit is contained in:
parent
58d5c8a812
commit
4e649d4344
6 changed files with 147 additions and 20 deletions
|
|
@ -4,25 +4,45 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
tailscaleMagicDNS = "neon-dory.ts.net";
|
||||
in
|
||||
{
|
||||
|
||||
age.secrets = {
|
||||
tailscale-authKey.file = ../../secrets/tailscale-authKey.age;
|
||||
cloudflare-tegola-apiKey = {
|
||||
file = ../../secrets/cloudflare-tegola-apiKey.age;
|
||||
mode = "440";
|
||||
owner = config.services.caddy.user;
|
||||
group = config.services.caddy.group;
|
||||
};
|
||||
};
|
||||
|
||||
my = {
|
||||
utils.commons.enable = true;
|
||||
|
||||
networking.tailscale = {
|
||||
enable = true;
|
||||
exitNode = "vps";
|
||||
authKeyFile = config.age.secrets.tailscale-authKey.path;
|
||||
services.media-mgr = {
|
||||
exportMetrics.enable = true;
|
||||
proxy = {
|
||||
enable = true;
|
||||
domain = "tegola.pro";
|
||||
host = "arr.internal";
|
||||
};
|
||||
};
|
||||
|
||||
monitoring = {
|
||||
prometheus = {
|
||||
enable = true;
|
||||
proxy = {
|
||||
domain = "tegola.pro";
|
||||
host = "metrics.internal";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
tailscale = {
|
||||
enable = true;
|
||||
magicDNSDomain = tailscaleMagicDNS;
|
||||
authKeyFile = config.age.secrets.tailscale-authKey.path;
|
||||
};
|
||||
|
||||
caddy.enable = true;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
|
|
@ -38,11 +58,24 @@
|
|||
services = {
|
||||
openssh.enable = true;
|
||||
|
||||
prometheus = {
|
||||
enable = true;
|
||||
};
|
||||
prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "metrics-host";
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
prometheus.exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.nameservers = [ "192.168.1.2" ];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue