75 lines
1.4 KiB
Nix
75 lines
1.4 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
tailscaleMagicDNS = "neon-dory.ts.net";
|
|
in
|
|
{
|
|
|
|
age.secrets = {
|
|
tailscale-authKey.file = ../../secrets/tailscale-authKey.age;
|
|
};
|
|
|
|
my = {
|
|
utils.commons.enable = true;
|
|
|
|
services.media-mgr = {
|
|
exportMetrics.enable = true;
|
|
};
|
|
|
|
monitoring = {
|
|
grafana.enable = true;
|
|
prometheus.enable = true;
|
|
loki.enable = true;
|
|
};
|
|
|
|
networking = {
|
|
tailscale = {
|
|
enable = true;
|
|
magicDNSDomain = tailscaleMagicDNS;
|
|
authKeyFile = config.age.secrets.tailscale-authKey.path;
|
|
};
|
|
|
|
};
|
|
|
|
virtualisation = {
|
|
proxmox.enable = true;
|
|
};
|
|
};
|
|
|
|
time.timeZone = "Europe/Rome";
|
|
|
|
# Extra packages
|
|
environment.systemPackages = with pkgs; [ ];
|
|
|
|
services = {
|
|
openssh.enable = true;
|
|
|
|
prometheus.scrapeConfigs = [
|
|
{
|
|
job_name = "host-metrics";
|
|
static_configs = [
|
|
{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
|
|
];
|
|
}
|
|
{
|
|
job_name = "host-caddy";
|
|
static_configs = [
|
|
{ targets = [ "caddy.internal:${toString config.services.prometheus.exporters.node.port}" ]; }
|
|
];
|
|
}
|
|
];
|
|
|
|
prometheus.exporters = {
|
|
node = {
|
|
enable = true;
|
|
enabledCollectors = [ "systemd" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "24.05";
|
|
}
|